954,577 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

data grid view

hi i have a database with the following coloumns

thid
thname
thdate

i have used the gridview control to display this info, also enabled paging and selection with it.

i want to jump to "one.aspx" page and set the value of a querystring variable "thid" to the value in the col thid when selected.

for example if there is a row in db
thid (1) thname(bharat) thdate(2009) when i select this row in the data grid view control it must redirect me to one.aspx?thid=1

Please help

bharatshivram
Light Poster
35 posts since Mar 2007
Reputation Points: 10
Solved Threads: 1
 

hi,

you can use a hyperlink to achieve your functionality

<asp:TemplateColumn HeaderText="Order">
<ItemTemplate>
<asp:Hyperlink runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"OrderID")%>' NavigateUrl='<%# "page.aspx?Orderid=" + DataBinder.Eval(Container.DataItem,"Orderid") + "&ProductID=" + DataBinder.Eval(Container.DataItem,"ProductID")%>' ID="Hyperlink1" NAME="Hyperlink1"/>
</ItemTemplate>
</asp:TemplateColumn>
greeny_1984
Posting Whiz
372 posts since Apr 2007
Reputation Points: 25
Solved Threads: 29
 
<asp:HyperLinkField DataNavigateUrlFields="ThreadID" DataNavigateUrlFormatString="viewpost.aspx?ThreadID={0}"
                    DataTextField="ThreadID" HeaderText="Thread ID" NavigateUrl="~/viewpost.aspx" />


this solved my problem

bharatshivram
Light Poster
35 posts since Mar 2007
Reputation Points: 10
Solved Threads: 1
 

i want code for develop media player forward & reverse button code

REwati
Newbie Poster
1 post since Mar 2010
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You