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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…

821 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