|
 |
aspx thread: Conditional HTML
Message #1 by "Hugh McLaughlin" <hugh@k...> on Thu, 6 Dec 2001 02:49:32
|
|
Hello everyone and thanks for your help in advance. In classic ASP, I
would often develop self-contained search pages, i.e. one page that
displays the search form, but when the submit button is clicked, the
search results are displayed (without the search box). This was
accomplished via inline code like the following:
If Submitbutton="Search" Then
%>
HTML Search Form
<%ELSE%>
Display Search Results
My question is how can this be accomplished in ASP.Net without using
inline code to conditionally display. Is it even advisable to do this?
Message #2 by "Mike Amundsen" <mike@a...> on Wed, 5 Dec 2001 21:51:03 -0500
|
|
try using the <asp:panel> control to enclose the various UI sections and set
the visibility on/off as needed.
MCA
-----Original Message-----
From: Hugh McLaughlin [mailto:hugh@k...]
Sent: Thursday, December 06, 2001 2:50 AM
To: ASP+
Subject: [aspx] Conditional HTML
Hello everyone and thanks for your help in advance. In classic ASP, I
would often develop self-contained search pages, i.e. one page that
displays the search form, but when the submit button is clicked, the
search results are displayed (without the search box). This was
accomplished via inline code like the following:
If Submitbutton="Search" Then
%>
HTML Search Form
<%ELSE%>
Display Search Results
My question is how can this be accomplished in ASP.Net without using
inline code to conditionally display. Is it even advisable to do this?
Message #3 by "Albert Davis" <albertdavis@h...> on Wed, 05 Dec 2001 21:49:38 -0500
|
|
Is your SubmitButton being initialized via a queryString during a postBack?
e.g. Your Legacy ASP
dim SubmitButton
SubmitButton = Request("SubmitType")
....
If SubmitButton = "Search" then
...
Al
>From: "Hugh McLaughlin" <hugh@k...>
>Reply-To: "ASP+" <aspx@p...>
>To: "ASP+" <aspx@p...>
>Subject: [aspx] Conditional HTML
>Date: Thu, 6 Dec 2001 02:49:32
>
>Hello everyone and thanks for your help in advance. In classic ASP, I
>would often develop self-contained search pages, i.e. one page that
>displays the search form, but when the submit button is clicked, the
>search results are displayed (without the search box). This was
>accomplished via inline code like the following:
>
>If Submitbutton="Search" Then
>%>
> HTML Search Form
><%ELSE%>
> Display Search Results
>
>My question is how can this be accomplished in ASP.Net without using
>inline code to conditionally display. Is it even advisable to do this?
>
>
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Message #4 by "Mike Amundsen" <mike@a...> on Wed, 5 Dec 2001 22:02:47 -0500
|
|
Hugh:
my post was incomplete (too quick on the SUBMIT)!
you can use <asp:panel> to hide/show the input form and the resulting
output. you can toggle this visibility in the CLICK event for the button(s).
does this help?
MCA
-----Original Message-----
From: Hugh McLaughlin [mailto:hugh@k...]
Sent: Thursday, December 06, 2001 2:50 AM
To: ASP+
Subject: [aspx] Conditional HTML
Hello everyone and thanks for your help in advance. In classic ASP, I
would often develop self-contained search pages, i.e. one page that
displays the search form, but when the submit button is clicked, the
search results are displayed (without the search box). This was
accomplished via inline code like the following:
If Submitbutton="Search" Then
%>
HTML Search Form
<%ELSE%>
Display Search Results
My question is how can this be accomplished in ASP.Net without using
inline code to conditionally display. Is it even advisable to do this?
|
|
 |