Hi,
In my module I got a "List" control on which I use a GridView to list records in the database.
I then added an "Edit" linkbutton next to each row which should redirect the user to a control where they can edit that record (not in the gridview, since the gridview just display some of the fields.)
I also created an "Edit" control that will retrieve the record requested and display a form where the user can edit it. (not the "Edit" control one seems to be use with DNN..just another control that will load data depending on the entry id that should get passed to it).
Thing is I'm not sure how to make the link (should it be a linkbutton even?) redirect to the edit control or how to pass / read the entry id.
This is what I got so far:
In my control / gridview...
<asp:TemplateField HeaderText="Edit">
<ItemTemplate>
<asp:LinkButton runat="server" Text="Edit" OnClick="BankDetails_EditEntry" />
</ItemTemplate>
</asp:TemplateField>
In my code behind:
protected void BankDetails_EditEntry(object sender, EventArgs e)
{
Response.Redirect(Globals.NavigateURL(PortalSettings.ActiveTab.TabID, "EditEntry", "mid=" + ModuleId.ToString()));
}