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
703 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

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…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

809 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