|
 |
aspx thread: assigning values to servertagged textboxes
Message #1 by <huzefa@n...> on Mon, 27 Nov 2000 08:45:23 -0500
|
|
hello again.
i have created a form with runat=server, and it contains textboxes
(again runat=server), i want to assign value to this textbox.
why cant i use <%..%> tags here. it is that i always will have to use
Page_Load ??
here is the code....
<form id="f1" action="myself.aspx" method="post" runat=server>
<asp:textbox id=3D"t1" text=3D"<%= Request.Params["t1"]%>
runat=server/>
<asp:button id="b1" text="Click me" runat=server/>
</form>
and here is the parser error...
Server tags cannot contain <% ... %> constructs
please help.
huzefa=0A
=0A
=0A
*****************=0A
Go to:=0A
www.NetWala.com " The Internet in every wallet "
Message #2 by Nilesh_Dhoot <Nilesh_Dhoot@s...> on Mon, 27 Nov 2000 15:36:40 +0530
|
|
I tried it and it works fine for me..for both(GET and POST method)
here is my code:
<HTML>
<BODY>
<form id="f1" action="myself.aspx" method="post" runat=server>
<asp:textbox id="t1" text="<%= Request.Form("Name")%>" runat=server/>
<asp:button id="b1" text="Click me" runat=server/>
</form>
<BODY>
</HTML>
> ----------
> From: huzefa@n...[SMTP:huzefa@n...]
> Reply To: ASP+
> Sent: Monday, November 27, 2000 7:15 PM
> To: ASP+
> Subject: [aspx] assigning values to servertagged textboxes
>
> hello again.
> i have created a form with runat=server, and it contains textboxes (again
> runat=server), i want to assign value to this textbox.
> why cant i use <%..%> tags here. it is that i always will have to use
> Page_Load ??
>
> here is the code....
> <form id="f1" action="myself.aspx" method="post" runat=server>
> <asp:textbox id="t1" text="<%= Request.Params["t1"]%> runat=server/>
> <asp:button id="b1" text="Click me" runat=server/>
> </form>
>
> and here is the parser error...
> Server tags cannot contain <% ... %> constructs
>
> please help.
> huzefa
>
>
> *****************
> Go to:
> www.NetWala.com " The Internet in every wallet "
>
|
|
 |