How can i save the span id value in .cs file?
My code:
i want to save "lblSystem" value.any ine help me.......
Thanks in advance.....
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sarath KumarPosted Feb 25, 2014, 6:21 AM
Jaganathan BantheswaranPosted Feb 25, 2014, 6:10 AM
Do you want to save id of a control or value of a control?
If you want to access a control in Server side [.cs file], you have to use runat="server" in the control like runat="server" />
Response.Cookies["Models"]["modelname"]= txt.InnerText;
Sarath KumarPosted Feb 25, 2014, 6:01 AM
I got answer.
aspx page:
<%--
in .cs page:
Response.Cookies["Models"]["modelname"] = txt.Value;
Lakshmanan Sethu SankaranarayanPosted Feb 25, 2014, 4:45 AM
Sarath KumarPosted Feb 25, 2014, 3:46 AM
My code:in aspx page
<%--
In .cs file
I want to save that value to:
Response.Cookies["Models"]["modelname"]="save here";\
please anyone help guys..i'm struck with this from last 3days..yhanks in advance...
Biswa Pujarini MohapatraPosted Feb 25, 2014, 12:08 AM
and in asp.cs page
you can get the value of Span using span.InnerText e.g.
lblSystem.InnerText = "Sarath";
hope it helps you
Lakshmanan Sethu SankaranarayanPosted Feb 24, 2014, 10:36 PM
Vithal WadjePosted Feb 24, 2014, 12:56 PM
Sarath KumarPosted Feb 24, 2014, 9:07 AM
KalaiPosted Feb 24, 2014, 8:50 AM
test.aspx
Sarath
test.aspx.cs
string lblName = lblSystem.InnerText.ToString();
KalaiPosted Feb 24, 2014, 8:23 AM