Click here to Skip to main content
15,889,116 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

i want to transfer data from one form using database methods to update table and all.
Posted

You will perhaps need to study a little bit about state management. In your paticular case you might wana have alook into how to use session variables.

a small snippet here

on page 1:

C#
Session["mydata"] = datatable;


on page 2:

C#
DataTable table = Session["mydata"] as DataTable;
if(table != null)
         //use the table here


For more details read this A Beginner's Tutorial on ASP.NET State Management[^]
 
Share this answer
 
Comments
jvamsikrishna 7-May-12 10:53am    
thanks rahul
by using session concept and cookies concept ypu will transper data from one page to another page
 
Share this answer
 
Comments
jvamsikrishna 7-May-12 10:54am    
thanks
Hi,
you can use Session,Application,QueryString Or Cookies.
for "QueryString" use this:
HTML
Response.Redirect("News.aspx?Id=25");

and in the news.aspx page :
HTML
if(Request.QuerySrting["Id"]!=null)
int id=Convert.ToInt32(Request.QuerySrting["Id"].ToString());
 
Share this answer
 
v2
Comments
jvamsikrishna 7-May-12 10:54am    
thank you hamid
 
Share this answer
 
Comments
jvamsikrishna 7-May-12 10:55am    
thank u
 
Share this answer
 
Comments
jvamsikrishna 7-May-12 10:55am    
thanks for your guidance
two ways to transfer data from one form to another
1-by using querystring
2-by using session

hope this will help you,enjoy coding
 
Share this answer
 
Hi ,
You can use
1 -QueryString but there is limitation of using QueryString Like it has Length you can't transfer object using Querystring
2 - Session you can use it to transfer Data between to pages or more but be aware of Session it create on the server not on Client side so many session's meaning you are taking all resource of your server and maybe it will crash .
Check this link Beginners Introduction to State Management Techniques in ASP.NET[^]
Best Regards
M.Mitwalli
 
Share this answer
 
v2
Comments
jvamsikrishna 7-May-12 10:56am    
thanks for ur suggestion
Mohamed Mitwalli 7-May-12 13:10pm    
your welcome :)
 
Share this answer
 
Comments
jvamsikrishna 7-May-12 10:57am    
thanks

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