Solved

GridView in Asp.net - need to select a specific record and once clicked on Select it shoudl go to another website that shows details of that record.

Posted on 2014-09-05
3
669 Views
Last Modified: 2014-11-12
I have a GridView with select enabled, I want the user to select an item from the list and once done, it will go to a details page where they can see all the details, what I need to do is once a person selects a record, I need it to go to a next page and I need to pass a value to that page so that it can search based on that variable. How can this be done? Any help is greatly appreciated.

I'm programming in ASP.NET and visual studio 2013 express if that helps.

Thank you.
0
Comment
Question by:TechMan4Ever
3 Comments
 
LVL 16

Accepted Solution

by:
Easwaran Paramasivam earned 300 total points
ID: 40307161
Well. You have to define a hyperlink column which could be selected in the grid. On clicking upon the link you could pass the selected value as QUERY STRING to another page. That page will pop-up. In the detail page you could parse the query string.

Instead of hyperlink you could use linkbutton as well in ASP.NET. Analyze which one would match your needs.



Below links explained well:

http://aspsnippets.com/Articles/Pass-QueryString-Parameters-using-HyperLinkField-in-ASPNet-GridView.aspx
http://aspsnippets.com/Articles/How-to-bind-and-pass-query-string-in-HyperLink-in-GridView-in-ASPNet.aspx
http://weblogs.asp.net/gurusarkar/pass-querystring-parameter-with-navigaterurl-in-hyperlink-inside-a-gridview


HTH.
0
 

Author Comment

by:TechMan4Ever
ID: 40312101
Just a quick question, I'm using ASP.NET MVC 4, I got things going but how do I pass the variables between pages, in Webforms, you use page.aspx.vb page, how do I do that in MVC 4?

Thank you for your help!
0
 
LVL 12

Assisted Solution

by:jitendra patil
jitendra patil earned 200 total points
ID: 40316805
if you are using MVC, which grid control are you using to render your data ?

if i am not wrong you intend to use Asp.Net Gridview, than its merely possible to get the desired output,  you may follow the link given below
Using GridView and DetailsView in ASP.NET MVC - Part 1

i would highly recommend not to use the above, but the choice is yours.

hope this helps.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now