TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
rasul moh
NA
79
85.2k
how to use html input text in C#
Aug 23 2013 1:06 AM
how to use html input text in aspx.cs page without using runat="server"
Default.aspx:
<input id="txtname" type="text" value="" />
Default.aspx.cs:
string aa="hello";
txtname.value =aa;
---> how to use
//string value pass to textbox how?
//how to call this txtname(textbox) in cs page ?
Reply me quick....................
help me plzzzzzzzzzzzzzzzzzz
Reply
Answers (
3
)
2
rasul moh
0
79
85.2k
Aug 23 2013 3:30 AM
ASPX Page:
Session["address"] = TextBox1.Text.ToString();
HTML Page:
<input type="text" size="34" name="address" value="<%=Session["address"].ToString()%>" id="text1" />
0
Iftikar Hussain
0
12.6k
448.6k
Aug 23 2013 3:57 AM
for binding the value declare one public variable
public string Data;
in your code
public string Data;
protected void Page_Load(object sender, EventArgs e)
{
Data = "Test";
DataBind();
}
and in your aspx
<input id="txtname" type="text" value="<%= Data %>" />
Regards,
Iftikar
-3
Iftikar Hussain
0
12.6k
448.6k
Aug 23 2013 1:09 AM
Hi,
Here it is
string data=Request.Form["txtname"];
Regards,
Iftikar
Populate treeview
A generic error occurred in GDI+ error in godday server?