Click here to Skip to main content
15,888,984 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I had a gridview which is "webform2aspx" page with data, and it contains three buttons i.e: edit, delete,close. when a user clicks "EDIT" button we need to get gridview data into textbox which is a webform1.aspx?

What I have tried:

I tried by using session. But i didn't get it.
Posted
Updated 4-May-18 18:25pm
Comments
F-ES Sitecore 19-Apr-18 5:28am    
Do you want to take data from webform2 and then redirect the browser to webform1 and include the data in a textbox on that form? Or are these two pages open simultaneously in different browsers\tabs\windows?
anil26595 19-Apr-18 5:33am    
Yeah i want data from webform2 to webform1 which includes data in to a textbox.

you have to pass unique id by querystring and get record from db by this id and assign this value to textbox.
 
Share this answer
 
Use this query ( string SesnId1 = dm.GetData("select IDBch from dbo.Batch where NamBch='" + GridView1.SelectedRow.Cells[3].Text.Trim() + "'").Rows[0][0].ToString();) on Gridview on by default select option

if
 
Share this answer
 
Comments

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900