P
Paul
Hi all,
I'm attempting to build a private message system into a site i'm
developing. The page which houses the private message code consists of
a multiview. The multiview contains a view of inbox, compose, reply
and read - these are switched between depending on the users actions -
and the active event is used to populate them etc. Firstly, does this
seem a sensible way of doing this?
Secondly, to display the contents of the inbox i'm using a gridview
control. An example of the control I am using can be seen below:
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox runat="Server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton Text='<%#Eval("from") %>' PostBackUrl ='<%# "~/
profile.aspx?user=" + Eval("from") %>' runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton Text='<%#Eval("title") %>' CommandArgument ='<%#
Eval("idmessage") %>' OnCommand ="title_OnCommand" runat="server" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
Is using link buttons in this way ok? The last item template uses the
id to pass to the read view, and populate the correct email. The only
thing that concerned me is that when a link is rolled over, rather
than seeing a nice url as in other mail packages, I see a long
postback URL. I guess this might be a question of aesthetics?
Lastly, I'd ideally like to have one column filled with checkboxes
which allow all selected messages to be deleted. I've attempted to
databind the field idmessage to the ID property of the checkbox, but
it doesn't like this. How would I go about adding this functionality?
Any help would be appreciated.
I'm attempting to build a private message system into a site i'm
developing. The page which houses the private message code consists of
a multiview. The multiview contains a view of inbox, compose, reply
and read - these are switched between depending on the users actions -
and the active event is used to populate them etc. Firstly, does this
seem a sensible way of doing this?
Secondly, to display the contents of the inbox i'm using a gridview
control. An example of the control I am using can be seen below:
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox runat="Server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton Text='<%#Eval("from") %>' PostBackUrl ='<%# "~/
profile.aspx?user=" + Eval("from") %>' runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton Text='<%#Eval("title") %>' CommandArgument ='<%#
Eval("idmessage") %>' OnCommand ="title_OnCommand" runat="server" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
Is using link buttons in this way ok? The last item template uses the
id to pass to the read view, and populate the correct email. The only
thing that concerned me is that when a link is rolled over, rather
than seeing a nice url as in other mail packages, I see a long
postback URL. I guess this might be a question of aesthetics?
Lastly, I'd ideally like to have one column filled with checkboxes
which allow all selected messages to be deleted. I've attempted to
databind the field idmessage to the ID property of the checkbox, but
it doesn't like this. How would I go about adding this functionality?
Any help would be appreciated.