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
636 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

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…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

763 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

11 Experts available now in Live!

Get 1:1 Help Now