c# - Save a Session to a Label then save back to a database -


i trying add session label in website save number saved in label database. session called customerid.

i have been trying call session doing

int vv = (int)session["customerid"] label7.text = vv;  //i know doesn't work can't work out need make label display variable. 

i trying save database so

newcarsrow.customerid = convert.toint32(label7.text.trim()); 

my question how label display int saved in customerid

string vv = session["customerid"].tostring(); label7.text = vv; 

you can't make int equivalent text property of label.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -