Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET
How to bind session data in input tag......
like
<input type="hidden" name="name" value="<%= name%>">
Please reply me......
Posted 18-Nov-12 23:51pm
v4
Comments
Mohd. Mukhtar at 19-Nov-12 6:02am
   
What have you tried??
Jitendra Kumar Gangwar at 19-Nov-12 7:44am
   
<input type="hidden" name="name" value="<%= name%>">
 
i try like above...
Sachin Gargava at 19-Nov-12 7:17am
   
what is your actual requirement? is there any specific reason?
Jitendra Kumar Gangwar at 19-Nov-12 7:43am
   
yes , there is a spwcific reason...
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

attach Id="MyInput" and runat="server"
 
and in code behind
MyInput.Value=session["MySession"].ToString();
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Hi
 
You can use Hiddenfield control instead of input html control.
  Permalink  
v3

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



Advertise | Privacy | Mobile
Web02 | 2.8.140821.2 | Last Updated 19 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100