how to call the data from one page the another page

i would like to call some particular record from one column of gridview from one page1 to another new page,for example:price column in page one,i would like to display the price column value in page2.any idea?

10/22/2007 4:17:55 PM 93655 articles. 5 followers. Follow

6 Replies

Similar Articles

[PageSpeed] 13



You can pass values from a gridview to another page using a hyperlink field for that particular column. Within the hyperlink control there is a value you can set in DataNavigateUrlFormatString.

 I can remember the make up of the what u enter but search for that and there be loads of pages explaining.


Hope this helps.



10/22/2007 5:31:32 PM

i don really understand what does u mean...can u explain in more detail please?and also i cannot found DataNavigateUrlFormatString in hyperlink.thx

10/22/2007 6:16:32 PM
Are you trying to send one value to page 2 or the whole column/row of values?  If you're just sending one value you could use a querystring to pass it.
10/22/2007 6:43:46 PM



 Say if u click on a Edit button/link in a grid view.

Just go to the code behind and inside the

Protected Sub GridView1_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GridView1.RowEditing
procedure write the following code


    price= GridView.Rows(e.NewEditIndex).Cells("index of price col").Text 

   resposne .redirect("page2url?price="&price)

In the  page2 to get the values of price

if not Request.QueryString("price") is nothing then


end if

Here price is sent from one page to another.

So hope so this will help U.. 


Srinivas Ramanujan

Words offer the means to meaning, and for those who will listen, the enunciation of truth !!!!!
10/23/2007 5:55:44 AM

DataNavigateUrlFormatString can be found if u r adding a Hyperlink column from the EditTemplate section of the grid.
here u can pass the value as a string.Basically the bottomline is to pass it as a querystring.


Please Mark as Answer if you find the post useful.
10/23/2007 9:20:24 AM

how to use the DataNavigateURlFormatString:-

 add hyperlink field into your gridview as below


<asp:HyperLinkField DataTextField="Field1" HeaderText="Field1" DataNavigateUrlFields="Field1"

SortExpression="Field1" DataNavigateUrlFormatString="Newpage.aspx?Field1_ID={0}" >


Which value you click on that particular coulmn will pass over in the url on the Page_load event for your new page you can pick up the value passed when clicking on the hyperlink like this

 Dim ValueFromLastPage As String = Request("Field1_ID")


Hope this is a bit clearer.





10/23/2007 9:42:04 AM

Similar Artilces:

how to navigate the url page in one web application page to another web application page
In my project one solution have 2 web apllications in one 1.webapplication1 2.webapplication2. in firt webapplication1 i created one aspx page like sample.axpx. in second webapplication2 i created one aspx page like sample2.aspx... in sample2.aspx page have hyperlinl. I need to navigate this hyperlink when i click it go to the sample.axpx. how can i write navigate url for me. ..thanks  As i understand u, you need Multi Project soltuionsee this link,

In a web page(c#), I want to call another page and come back to next instruction of calling page
In a web page(c#), I want to call another page and come back to next instruction of calling page. Called page have no web item , it has only c# codes. after executing of this page (by IExplore), I want the remaining lines of calling page to be executed. How can I do that? What are you trying to do? What is the second page accomplishing? Will the first page stay open and the second page closes? You might be able to use WebRequest and WebResponse to do what you want. Hey bro, since you say that the called page has no web items, why dont you put the code in the called pa...

How to open another web page from one web page
Hi, I am writing an 2.0 web page with a link to another web page by clicking a button control on the page, so how can I link it in the codes? I cannot access another aspx page class within the current aspx page class.  Thanks If you need to re-direct the user to another page after pressing your Button, then use the Response.Write method like so: Response.Redirect("~/Default.aspx")Thanks, EdMicrosoft MVP - ASP/ASP.NET 1) Response.Redirect( "Destination PageName");2) Response.Transfer("Destination PageName");3) Hyperlink(  set Url="...

How to databind control in one web page from another web page
Hi all,  I have a listbox control and a button control in a web page. Once the user clicks the button another web page is opened. The new web page will accept some data from the user which will be used to databind the listbox in the first web page. In other words, the two web pages ( the parent window and the child window) are open at the same time. The child page needs to databind a control in the parent page. Is there a way to do it? I need some code. Thx in advance Update: I hate to do this. Looks like I will have to take help of viewstate and session si...

All web pages hang on web server when one of the web pages calls a run away sql query
Hi: We have a Windows 2003 dedicated web server running the .NET Frameworks 1.0 and 2.0.  We have a SQL Server cluster running SQL Server 2000.  Unfortunately, we do not have a test environment.  I have 2 .NET web sites in production.  My coworker has a voting .NET web page using AJAX on the same server.  The coworker wrote a query that was not indexing properly and when the page fired the query...the cluster went to almost 100% utilization.  My two web pages would hang and show a blank white page on the default.aspx.  Neither of m...

Is it possible to embed part of one web page into another web page?
Any answers will be highly appreciated.  Thanks. If you can adjust the page you want to embed onto the other page, you could use a .ascx (web forms control).  Then you can add controls to it and just drag and drop it using VS.NET from the Solution Explorer window to the webform.  You can then also embed it onto other pages in that same web project easily by drag n drop.  I hope this helps, it's not exactly a portion of a web page but may be an acceptable alternative for you.Rachel AppelMVP - ASPInsider In order to better answer this, I could use some details as ...

A page can have only one server-side Form tag
I have a web user control in my web page.  The user control (ascx) consist of a text box and button. The web page consist of text boxes and buttons also.  Both pages have form tags with runat=server.  When I run the web page it comes up with the error "A page can have only one server-side Form tag." Both the user control and web page need the form tag with runat=server.  Is there a way I can code these pages where there won't be a conflict between the web user control and the web page? Thanks   JohnMo wrote:Both the user control and web page need the form tag wit...

TRansfering data from one page to another page?
 in my web application, when user login i get a value from called empid from database for that particular user and i wan to use that empid for entire apllication till the user logged in....How can i use same empid in entire pages????i hav to keep using responce redirect to transfer that empid from one page to another page?????  The most common way to do this is to use a Session variable.  But there are loads of ways of "maintaining state" across web pages: Regards Mike [MVP - ASP/ASP.NET]My site Indeed, you could use a ...

how to transfer data one page to another page
hi. anyone help me, how to transfer data my page to another url page  using post method in with c# check out the link > Transferring page values to another pageyou will find various techniques to transfer data from one page to another page using Cookies, QueryString, Session, Application etc., using Server.Transfer / Response.Redirect...hope it helps./. Thanx, [KaushaL] || BloG || Profile || Microsoft MVP"I would love to change the world, but they won’t give me the source code"Don't forget to click "Mark as Answer" on the post that helped ...

data pass from one page to another page
 Hi,If i have a 3/4 pages and i want to pass the values of the forms and at last i save the data of the forms. Let , my each page contains about 10 values, and user can go previous page to edit. Finally, all the data of the forms are saved. I know Session , but which is the best practice for this?Thanks.. naqibdotNet Coder You have the answer: Session. You can do this: Session["data1"] = data1value; Session["data2"] = data2value; And on the page where it is needed, go: decimal price = (decimal)Session["price"]; The casting is necessary. Store each f...

Can my web page with a form submit to other web pages forms?
I was wondering if I created an aspx page that had a form on it that I could use the submit button to submit this form's contents to other web pages forms(servers accepting those form's data). I am thinking this would be a great way to update data on particular web pages without having to actually visit those similar web pages. Any ideas, examples would be much appreciated. Thanks in advance.  Yes you can.  It's called Cross Page Posting: might ...

how to bring value data from one page to another page?
 hello all...i have page1.aspx and page2.aspxin page1.aspx is containning:textbox1(text=1000)button end page2.aspx is containning:label1 i want when click button in page1.aspx, it run to page2.aspx and display like that:1000 how to make it?mycode in vb at page2 like that: label1.text= me.previouspage.findcontrol("textbox1").tostring but it's not working...what should i do?thx... is a stateless environment. You'll need to do something like pass the value in a query string or  store it in session and then retrieve it.Here is ...

Multiple forms on one page, how do I post on to another page?
I have several submit buttons and text boxes, datagrids, etc. on a single page. I want one particular text box and submit button to POST to another page. Since there is only one form tag with postback, is this possible. I need POST instead of querystring because the string may be long (it's a search field) and the results are too large to fit on the same page. Can I take my text box value and submit that to another page from a page with numerous other postback actions on it? if(youTryToBeSmarter) { i.WillTryToBeNicer(); } You can do a couple of things: (1) Use a non-serv...

Problem in passing data from one page to another page
i am using session variable to pass the data from one page to another page. i am not able to pass the data from one page to another page . what might be the problem? Session["unm"]="hai"; in another page Response.Write(Session["unm"]); It is not printing any data. i tested the code it is fine !!!!this vb version but does not matter Me.Session("name") = "ss" Me.Response.Write(Session("name"))can you tell me where this code is placed ?? can you show me the function or method that hold your code??? i might be able to help!!Fadil Alnassar | FREE Nodil T...

Web resources about - how to call the data from one page the another page -

Ted Cruz Tempts Fate With New Focus on New Hampshire
Ted Cruz has a most unusual problem. He could plausibly win the first three states of the Republican nomination battle. But don’t pop the bubbly ...

'Making a Murderer': Filmmakers say media is 'demonizing' Steven Avery
People Magazine 'Making a Murderer': Filmmakers say media is 'demonizing' Steven Avery Daily Democrat The filmmakers behind "Making a Murderer," ...

'Spotlight' wins best picture at Critics' Choice Awards
USA TODAY 'Spotlight' wins best picture at Critics' Choice Awards USA TODAY LOS ANGELES — Spotlight edged forward in the Oscar race Sunday ...

Seattle Seahawks' top five offseason questions - Seattle Seahawks Blog- ESPN
Seattle's season ended with a 31-24 loss to the Panthers in an NFC divisional playoff game. Here are five questions facing the Seahawks this ...

Burkina Faso and Mali to coordinate forces after deadly attacks
By Matthew Mpoke Bigg and Nadoun Coulibaly OUAGADOUGOU (Reuters) - Burkina Faso and Mali have agreed to work together to counter the growing ...

US Embassy: Americans missing in Iraq
USA TODAY US Embassy: Americans missing in Iraq USA TODAY BAGHDAD (AP) — The U.S. Embassy confirmed Sunday that "several" Americans have gone ...

Jeremy Corbyn says we need back channels to ISIS to end to the Syrian war
The Labour leader stopped short of calling for dialogue with ISIS but compared the situation to when the British government had lines of communication ...

Crews Resume Search for Missing California Ski Instructor
Crews have resumed their search for a ski instructor who went missing at a Northern California ski resort

Microsoft’s Word Flow keyboard on Windows Phone is coming to iOS
Having ported its Cortana intelligent personal assistant from Windows Phone to iOS, Microsoft is apparently set to bring another key functionality ...

Wait, The ‘Star Wars: The Force Awakens’ Instant Bread Is Edible And Took 3 Months To Make
Star Wars: The Force Awakens had one of the largest productions of all time, as its budget ultimately clocked in at $200 million. Obviously, ...

Resources last updated: 1/18/2016 8:46:36 AM