•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the VB.NET section within the Software Development category of DaniWeb, a massive community of 456,507 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,657 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our VB.NET advertiser: Programming Forums
Views: 1046 | Replies: 0
![]() |
•
•
Join Date: Aug 2007
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
I have a forum where the threads are showing in a datagrid with paging. The paging works fine and show the right result on the next pages.
My problem is in the column which contains a link to the page where the client can read the thread. The link includes the datakey, but the datakey is showing the keys from the first page.
This is the column:
The datagrid contains this line:
Here is the sub where the site is redirected to the wrong post:
Viewstate is disabled
My problem is in the column which contains a link to the page where the client can read the thread. The link includes the datakey, but the datakey is showing the keys from the first page.
This is the column:
<asp:Templatecolumn ItemStyle-Width="356" ItemStyle-CssClass="bg_forumTema" >
<itemtemplate>
<asp:linkbutton ID="lbTema" runat="server" CssClass="formal_blue_bold" CommandName="Select"
Text='<%#Container.DataItem("tema")%>' />
</itemtemplate>
</asp:templatecolumn>The datagrid contains this line:
OnSelectedIndexChanged="vis_indlaeg"
Here is the sub where the site is redirected to the wrong post:
Sub vis_indlaeg(obj as object, e as EventArgs)
response.Redirect("forum_vis_indlaeg.aspx?id=" & Datagrid1.DataKeys(Datagrid1.SelectedIndex))
end subViewstate is disabled
![]() |
•
•
•
•
•
•
•
•
DaniWeb VB.NET Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Problem in writing from a datagrid to Excel.. (ASP.NET)
- How can we populate a datagrid in VB.NET? (VB.NET)
- problem in VB.NET? (VB.NET)
- Datagrid - no value at index ### error when scroll and sort (VB.NET)
- Print Datagrid issue (ASP.NET)
- Paging goes to wrong page (ASP.NET)
- How will I Capture this Dynamic Data (ASP.NET)
- ASP.NET Tutorial: Caching in ASP.NET (ASP.NET)
- How to sort the rows in the datagrid and update it successfully? (VB.NET)
Other Threads in the VB.NET Forum
- Previous Thread: Automate Web Browser
- Next Thread: DataGridView populate


Linear Mode