Thursday, March 29, 2012

Separating html from code

If I have a form which I only want to display if a certain variable in
Test.aspx.vb becomes True, how can I do that without using the old method
inside the Test.aspx code:

<%
If bolVar = True then
%>
<form id=myFrm name=myFrm action='<%=strTargetPage%>'>
</form>
<%
End If
%Why not do this in the button_click event? I mean leave the action alone, do
your work in the event upon postback and rediect/pass the info acordingly.

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com

"Manuel" <My@.NoMailLand.com> wrote in message
news:ZKidnUMSCYGVEDbcRVn-tQ@.giganews.com...
> If I have a form which I only want to display if a certain variable in
> Test.aspx.vb becomes True, how can I do that without using the old method
> inside the Test.aspx code:
> <%
> If bolVar = True then
> %>
> <form id=myFrm name=myFrm action='<%=strTargetPage%>'>
> </form>
> <%
> End If
> %
It never occurred to me :p

I'm going to try it now, thx.

"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:%23tC8rdl1EHA.2068@.TK2MSFTNGP10.phx.gbl...
> Why not do this in the button_click event? I mean leave the action alone,
> do your work in the event upon postback and rediect/pass the info
> acordingly.
> --
> Curt Christianson
> Owner/Lead Developer, DF-Software
> Site: http://www.Darkfalz.com
> Blog: http://blog.Darkfalz.com
>
> "Manuel" <My@.NoMailLand.com> wrote in message
> news:ZKidnUMSCYGVEDbcRVn-tQ@.giganews.com...
>> If I have a form which I only want to display if a certain variable in
>> Test.aspx.vb becomes True, how can I do that without using the old method
>> inside the Test.aspx code:
>>
>> <%
>> If bolVar = True then
>> %>
>> <form id=myFrm name=myFrm action='<%=strTargetPage%>'>
>> </form>
>> <%
>> End If
>> %>
>>

0 comments:

Post a Comment