•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 423,421 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 4,599 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 ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 3343 | Replies: 14
![]() |
•
•
Join Date: Jun 2008
Posts: 5
Reputation:
Rep Power: 0
Solved Threads: 0
hey bhavna...my problem is same like you.....
This is forum submitted by you....
Actually what I m trying to do is I m firing a query in SQL Server 2005 to retrieve records for selected criteria.
Based on the selection the query result I m taking that in a datatable and I have a GridView where this list of results is displayed.
Now there is a hyperlink in the Grid to select the detailed information about a particular result.
eg. In the query result I get 5 records matching the selection criteria, which are stored in a datatable.
now these reults are displayed in the grid and when i click on the hyperlink of a particular row then the records of that row should get selected and the detailed info should get displayed in another page.
me too tryng to do the same.....i ant to display all detailed information on the next page corresponding to particular row on clicking of an hyperlink that is attached in my grid.
thnksss..
•
•
Join Date: Mar 2008
Posts: 39
Reputation:
Rep Power: 1
Solved Threads: 7
hi bavana,
i think u r using template field for hyper link so u can do like this
use this hyper link in itemtemplate and unquekey is the id in db which u want pass as querystring to nxtpage...in next page u have uniqueid...so goto db for retriving ful details...hope it will be helpful...
i think u r using template field for hyper link so u can do like this
<asp:Hyperlink id="something" text="more" navigateurl='<%# "~/moredetails.aspx?id="+Eval("uniquekey") %>' target="_bank"/>got solution ?, please mark the thread as Solved.
Thanks & Regards,srikanth kadem
srikanthkadem@rediffmail.com
•
•
Join Date: Jun 2008
Posts: 5
Reputation:
Rep Power: 0
Solved Threads: 0
•
•
•
•
hi bavana,
i think u r using template field for hyper link so u can do like this
use this hyper link in itemtemplate and unquekey is the id in db which u want pass as querystring to nxtpage...in next page u have uniqueid...so goto db for retriving ful details...hope it will be helpful...<asp:Hyperlink id="something" text="more" navigateurl='<%# "~/moredetails.aspx?id="+Eval("uniquekey") %>' target="_bank"/>
but there is some problem in my sql database..i cant insert data in each field.so dere is not unique key.. now how can i retrive all info on newpage.aspx(based on the results coming on search.aspx page in the datagrid)
here is the code
<asp:datagrid id="DataGrid" runat="server" Width="83%" DataKeyField="ROW_ID" HeaderStyle-BackColor="#8cd1a2" BorderColor="White" HeaderStyle-BorderColor="black"
AutoGenerateColumns="False" AllowPaging="True" CellPadding="3" style="z-index: 100; left: 12px; position: absolute; top: 796px; overflow: auto;" Height="1px" OnSelectedIndexChanged="DataGrid_SelectedIndexChanged" AllowSorting="True" BackColor="White" BorderStyle="Ridge" BorderWidth="2px" CellSpacing="1" Font-Bold="False" Font-Italic="False" Font-Names="Arial" Font-Overline="False" Font-Size="Medium" Font-Strikeout="False" Font-Underline="False" GridLines="None" HorizontalAlign="Left" PageSize="40" OnPageIndexChanged="DataGrid_PageIndexChanged" OnItemDataBound="DataGrid_ItemDataBound" >
<Columns>
<asp:TemplateColumn HeaderText="Name">
<HeaderStyle Font-Bold="True" HorizontalAlign="Left" BorderColor="Black"></HeaderStyle>
<ItemStyle HorizontalAlign="Left" VerticalAlign="Top" BorderColor="Black"></ItemStyle>
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "Name")%>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="View Abstract ">
<ItemTemplate>
<asp:HyperLink ID="hyperlink1" Text='<%# Eval(" View Abstract") %>' NavigateUrl="~/NewAbs.aspx" runat="server" >
<%# DataBinder.Eval(Container.DataItem, " View Abstract")%>
</asp:HyperLink>
</ItemTemplate>
</asp:TemplateColumn>
Last edited by gunj : Jun 4th, 2008 at 7:18 am.
•
•
Join Date: Sep 2006
Posts: 104
Reputation:
Rep Power: 3
Solved Threads: 0
•
•
•
•
but there is some problem in my sql database..i cant insert data in each field.so dere is not unique key.. now how can i retrive all info on newpage.aspx(based on the results coming on search.aspx page in the datagrid)
here is the code
<asp:datagrid id="DataGrid" runat="server" Width="83%" DataKeyField="ROW_ID" HeaderStyle-BackColor="#8cd1a2" BorderColor="White" HeaderStyle-BorderColor="black"
AutoGenerateColumns="False" AllowPaging="True" CellPadding="3" style="z-index: 100; left: 12px; position: absolute; top: 796px; overflow: auto;" Height="1px" OnSelectedIndexChanged="DataGrid_SelectedIndexChanged" AllowSorting="True" BackColor="White" BorderStyle="Ridge" BorderWidth="2px" CellSpacing="1" Font-Bold="False" Font-Italic="False" Font-Names="Arial" Font-Overline="False" Font-Size="Medium" Font-Strikeout="False" Font-Underline="False" GridLines="None" HorizontalAlign="Left" PageSize="40" OnPageIndexChanged="DataGrid_PageIndexChanged" OnItemDataBound="DataGrid_ItemDataBound" >
<Columns>
<asp:TemplateColumn HeaderText="Name">
<HeaderStyle Font-Bold="True" HorizontalAlign="Left" BorderColor="Black"></HeaderStyle>
<ItemStyle HorizontalAlign="Left" VerticalAlign="Top" BorderColor="Black"></ItemStyle>
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "Name")%>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="View Abstract ">
<ItemTemplate>
<asp:HyperLink ID="hyperlink1" Text='<%# Eval(" View Abstract") %>' NavigateUrl="~/NewAbs.aspx" runat="server" >
<%# DataBinder.Eval(Container.DataItem, " View Abstract")%>
</asp:HyperLink>
</ItemTemplate>
</asp:TemplateColumn>
Hi gunj,
U have two ways to do, first what I thought earlier and the second which I implemented
1) First of all I need to know that on which criteria u r searching? Anyway if ur SP is querying with that and gives u the output as datatable, u can send this datatable in session to the next page and get the data from there to display the info after clicking the hyperlink. If u have any unique value in the gridview (in my case i had a pnumber field was unique) I looped out the records in the gridview and set hyperlink's navigate URL as the pnumber based upon which it fetches only the specified pnumber and displayed records accordingly.
2) Second which I implemented is same looped out the rows in grid, navigated the hyperlink to the pnumber and sent this pnumber to the next page as a querystring and based on that querystring I had a method in my application which fetches all records based on that particular pnumber. I got all records and displayed that .
•
•
Join Date: Jun 2008
Posts: 5
Reputation:
Rep Power: 0
Solved Threads: 0
hi dear.can u pl paste the code..it will help me...
actually my serach is based on the four field.--search by name
search by thesis
search by keywords
search by year...
according to these four different fields users can gt the results....
the results in the datagrid cOME OUT IN THIS WAY..
thesis number,title of thesis,name,year,adress,specialisation,hyperlink(for ABSTRACT)
i want now that this hyperlink which is in the last colummnn of the datagrid fetch the Abstarct from the table based on that row results and disply it on the next page..
im using sql queries for fetching the data from the table..
actually my serach is based on the four field.--search by name
search by thesis
search by keywords
search by year...
according to these four different fields users can gt the results....
the results in the datagrid cOME OUT IN THIS WAY..
thesis number,title of thesis,name,year,adress,specialisation,hyperlink(for ABSTRACT)
i want now that this hyperlink which is in the last colummnn of the datagrid fetch the Abstarct from the table based on that row results and disply it on the next page..
im using sql queries for fetching the data from the table..
![]() |
•
•
•
•
•
•
•
•
DaniWeb ASP.NET Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Other Threads in the ASP.NET Forum
- Previous Thread: optgroup in asp.net 1.0 using vb.net
- Next Thread: menu items


Linear Mode