|
 |
aspx_professional thread: RE: aspx_professional digest: August 07, 2001
Message #1 by Mathieu CLERTE <MathieuC@i...> on Tue, 7 Aug 2001 13:05:28 -1000
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html;
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version
5.5.2653.12">
<TITLE>RE: aspx_professional digest: August 07, 2001</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=3D2>DataSet is more likely to be used because it's XML
integrated.</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>-----Message d'origine-----</FONT>
<BR><FONT SIZE=3D2>De : ASPX_Professional digest [<A
HREF=3D"mailto:aspx_professional@p...">mailto:aspx_professional@
p2p.wrox.com</A>]</FONT>
<BR><FONT SIZE=3D2>Envoy=E9 : mardi 7 ao=FBt 2001 13:00</FONT>
<BR><FONT SIZE=3D2>=C0 : aspx_professional digest recipients</FONT>
<BR><FONT SIZE=3D2>Objet : aspx_professional digest: August 07,
2001</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>ASPX_PROFESSIONAL Digest for Tuesday, August 07,
2001.</FONT>
</P>
<P><FONT SIZE=3D2>1. RE: Question</FONT>
<BR><FONT SIZE=3D2>2. RE: FW: Re: Webforms and multiple pages</FONT>
<BR><FONT SIZE=3D2>3. RE: FW: Re: Webforms and multiple pages</FONT>
</P>
<P><FONT
SIZE=3D2>---------------------------------------------------------------
-------</FONT>
</P>
<P><FONT SIZE=3D2>Subject: RE: Question</FONT>
<BR><FONT SIZE=3D2>From: "Mitch Denny"
<mitch.denny@w...></FONT>
<BR><FONT SIZE=3D2>Date: Tue, 7 Aug 2001 09:14:53 +1000</FONT>
<BR><FONT SIZE=3D2>X-Message-Number: 1</FONT>
</P>
<P><FONT SIZE=3D2>Marco,</FONT>
</P>
<P><FONT SIZE=3D2>There wouldn't be much point returning a
SqlDataReader</FONT>
<BR><FONT SIZE=3D2>because it is connection orientated, so you can't
"serialize"</FONT>
<BR><FONT SIZE=3D2>a network connection. By default, your only option
is a DataSet.</FONT>
</P>
<P><FONT SIZE=3D2>----------------------------------------</FONT>
<BR><FONT SIZE=3D2>- Mitch Denny</FONT>
<BR><FONT SIZE=3D2>- <A HREF=3D"http://www.warbyte.com"
TARGET=3D"_blank">http://www.warbyte.com</A></FONT>
<BR><FONT SIZE=3D2>- mitch.denny@w...</FONT>
<BR><FONT SIZE=3D2>- +61 (414) 610-141</FONT>
<BR><FONT SIZE=3D2>-</FONT>
</P>
<P><FONT SIZE=3D2>> -----Original Message-----</FONT>
<BR><FONT SIZE=3D2>> From: Marco Paolieri [<A
HREF=3D"mailto:mpaolieri@t...">mailto:mpaolieri@t...</
A>] </FONT>
<BR><FONT SIZE=3D2>> Sent: Monday, 6 August 2001 9:12 PM</FONT>
<BR><FONT SIZE=3D2>> To: ASPX_Professional</FONT>
<BR><FONT SIZE=3D2>> Subject: [aspx_professional] Question</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> Hi, I'm developing a web service, exactly
a data web service. </FONT>
<BR><FONT SIZE=3D2>> I must only read all records in a SQL Table and
print them on </FONT>
<BR><FONT SIZE=3D2>> the browser. </FONT>
<BR><FONT SIZE=3D2>> So I want to know in your opinion if is better
make a web method in </FONT>
<BR><FONT SIZE=3D2>> the .asmx that returns a DataSet or a
SQLDataReader. </FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> Pls answer me</FONT>
<BR><FONT SIZE=3D2>> Bye</FONT>
<BR><FONT SIZE=3D2>> Marco</FONT>
<BR><FONT SIZE=3D2>></FONT>
</P>
<P><FONT
SIZE=3D2>---------------------------------------------------------------
-------</FONT>
</P>
<P><FONT SIZE=3D2>Subject: RE: FW: Re: Webforms and multiple
pages</FONT>
<BR><FONT SIZE=3D2>From: Robert Seber
<robert.seber@n...></FONT>
<BR><FONT SIZE=3D2>Date: Tue, 7 Aug 2001 09:12:51 +0100</FONT>
<BR><FONT SIZE=3D2>X-Message-Number: 2</FONT>
</P>
<P><FONT SIZE=3D2>To be honest I haven't tested this, but I suspect
that it won't cure</FONT>
<BR><FONT SIZE=3D2>Benjamin's problem. Benjamin wants to access
the controls in one ASPX from</FONT>
<BR><FONT SIZE=3D2>another ASPX without resorting to Response or
Request. Pages run with</FONT>
<BR><FONT SIZE=3D2>Server.Execute still won't be able to see objects in
another ASPX.</FONT>
</P>
<P><FONT SIZE=3D2>Rob.</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: FAROI, David [<A
HREF=3D"mailto:David.FAROI@A...">mailto:David.FAROI@A...
.com</A>]</FONT>
<BR><FONT SIZE=3D2>Sent: Monday, August 06, 2001 3:25 PM</FONT>
<BR><FONT SIZE=3D2>To: ASPX_Professional</FONT>
<BR><FONT SIZE=3D2>Subject: [aspx_professional] RE: FW: Re: Webforms
and multiple pages</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>Hi,</FONT>
</P>
<P><FONT SIZE=3D2>I use the following code to do something like
redirect command.</FONT>
<BR><FONT SIZE=3D2>I use "pseudo-frame" to all my
pages.</FONT>
<BR><FONT SIZE=3D2>In fact, my page is a big table with separate TD and
TR tag</FONT>
<BR><FONT SIZE=3D2>(top,left,middle,right and bottom frames
like)</FONT>
<BR><FONT SIZE=3D2>I separate my page to 5 aspx files which will be
included in a single page</FONT>
<BR><FONT SIZE=3D2>called "index.aspx" (see source code
below) at runtime:</FONT>
<BR><FONT SIZE=3D2><!-- #include
virtual=3D3D"Inc\Imports.aspx" --></FONT>
<BR><FONT SIZE=3D2><% Server.Execute("Inc\MenuTop.aspx")
%></FONT>
<BR><FONT SIZE=3D2><% Server.Execute("Inc\MenuLeft.aspx")
%></FONT>
<BR><FONT SIZE=3D2><%=3D20</FONT>
<BR> <FONT SIZE=3D2>Dim
FileSpec as string</FONT>
<BR> <FONT SIZE=3D2>Select
Case Session("idR")</FONT>
<BR><FONT SIZE=3D2>
Case "2" :
FileSpec =3D3D "SubShowDetails.aspx"</FONT>
<BR><FONT SIZE=3D2>
Case Else : FileSpec =3D3D
"Subsidiary.aspx"</FONT>
<BR><FONT SIZE=3D2> End
Select</FONT>
<BR> <FONT
SIZE=3D2>Server.Execute(FileSpec)</FONT>
<BR><FONT SIZE=3D2>%></FONT>
<BR><FONT SIZE=3D2><% Server.Execute("Inc\MenuRight.aspx")
%></FONT>
<BR><FONT SIZE=3D2><%
Server.Execute("Inc\MenuBottom.aspx") %></FONT>
</P>
<P><FONT SIZE=3D2>The first include is to import all namespaces needed
on my web pages.</FONT>
</P>
<P><FONT SIZE=3D2>If you've got a web site with an architecture which
the same top,left,right</FONT>
<BR><FONT SIZE=3D2>and bottom menu, this code could be very
usefull.</FONT>
</P>
<P><FONT SIZE=3D2>With this technic your pages will be loaded more
faster because only the</FONT>
<BR><FONT SIZE=3D2>middle menu was reloaded (with redirect
capabilities).</FONT>
<BR><FONT SIZE=3D2>I think this prevent using of frames that can
generat many errors with some</FONT>
<BR><FONT SIZE=3D2>browser and increase site performances.</FONT>
<BR><FONT SIZE=3D2>If you use Server.Transfer, you just have a redirect
method and I not sure</FONT>
<BR><FONT SIZE=3D2>that script codes was executed.</FONT>
<BR><FONT SIZE=3D2>By using Server.Execute, script codes will be
execute</FONT>
</P>
<P><FONT SIZE=3D2>I hope this will help someone to improve .net
performance.</FONT>
</P>
<P><FONT SIZE=3D2>Regards,</FONT>
</P>
<P><FONT SIZE=3D2>David FAROI</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Robert Seber [<A
HREF=3D"mailto:robert.seber@n...">mailto:robert.seber@n...
ecisions.co.uk</A>]</FONT>
<BR><FONT SIZE=3D2>Sent: lundi 6 ao=3DFBt 2001 11:08</FONT>
<BR><FONT SIZE=3D2>To: ASPX_Professional</FONT>
<BR><FONT SIZE=3D2>Subject: [aspx_professional] FW: Re: Webforms and
multiple pages</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>Here's a previous solution to this problem
(below). It works, but as a</FONT>
<BR><FONT SIZE=3D2>solution it's not very scalable (imagine a site with
400 pages - 400</FONT>
<BR><FONT SIZE=3D2>panels?).</FONT>
</P>
<P><FONT SIZE=3D2>The problem you are facing is a very common
one. A couple of other</FONT>
<BR><FONT SIZE=3D2>suggestions I've seen suggest overriding the HTTP
parser, using</FONT>
<BR><FONT SIZE=3D2>Server.Transfer or using Response.Redirect, all of
which have their own</FONT>
<BR><FONT SIZE=3D2>issues.</FONT>
</P>
<P><FONT SIZE=3D2>I'm keeping my fingers crossed and hope that
Microsoft come up with a clean</FONT>
<BR><FONT SIZE=3D2>solution to the problem for the final
release.</FONT>
</P>
<P><FONT SIZE=3D2>Rob.</FONT>
</P>
<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: ankurs@s... [<A
HREF=3D"mailto:ankurs@s...">mailto:ankurs@s...</A>]</FONT>
<BR><FONT SIZE=3D2>Sent: Monday, June 04, 2001 7:44 PM</FONT>
<BR><FONT SIZE=3D2>To: ASPX_Professional</FONT>
<BR><FONT SIZE=3D2>Subject: [aspx_professional] Re: Webforms and
multiple pages</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>Hi,</FONT>
</P>
<P><FONT SIZE=3D2>This may be a possible solution to your problem.
Instaed of having 3</FONT>
<BR><FONT SIZE=3D2>pages, code all of them in one .aspx page. YOu can
assign each sections </FONT>
<BR><FONT SIZE=3D2>html a panel id and make it conditionally
visible.</FONT>
</P>
<P><FONT SIZE=3D2>To make it more clear,</FONT>
</P>
<P><FONT SIZE=3D2>For your display part of .aspx page,</FONT>
</P>
<P><FONT SIZE=3D2>1) divide each of the three sections into three
panels, each having a</FONT>
<BR><FONT SIZE=3D2>unique Id (asp.net supports this). Only one panel is
visible at a time. </FONT>
<BR><FONT SIZE=3D2>When the post button is clicked, the code behind the
page is checked.</FONT>
</P>
<P><FONT SIZE=3D2>For the code behind</FONT>
</P>
<P><FONT SIZE=3D2>1) On receiving the posted contents of teh form,
check which of your 3</FONT>
<BR><FONT SIZE=3D2>conditions is true. Set the visibility of the other
2 panel Id's as false</FONT>
</P>
<P><FONT SIZE=3D2>This avoids a response.redirect to other
pages.</FONT>
</P>
<P><FONT SIZE=3D2>You can find an example on making panel id's
invisible at asp101.com and</FONT>
<BR><FONT SIZE=3D2>4guysfromrolla.com</FONT>
</P>
<P><FONT SIZE=3D2>Hope this helps,</FONT>
</P>
<P><FONT SIZE=3D2>Ankur</FONT>
</P>
<BR>
<BR>
<BR>
<BR>
<P><FONT SIZE=3D2>> I'm having a problem producing a multi outcome
site with webforms.</FONT>
<BR><FONT SIZE=3D2>For example:</FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>> User fills out a form on a page (1). If
they fill out the form</FONT>
<BR><FONT SIZE=3D2>incorrectly</FONT>
<BR><FONT SIZE=3D2>> they are returned to page 1 with a message
prompting them to correct =3D</FONT>
<BR><FONT SIZE=3D2>the</FONT>
<BR><FONT SIZE=3D2>> error. If they fill out the form correctly they
are sent to a results =3D</FONT>
</P>
<P><FONT SIZE=3D2>page</FONT>
<BR><FONT SIZE=3D2>> (2). If they are not yet logged in they
are sent to page 3. My =3D</FONT>
<BR><FONT SIZE=3D2>problem</FONT>
<BR><FONT SIZE=3D2>is</FONT>
<BR><FONT SIZE=3D2>> this: How do I send them to the correct
page without knowing which=3D20</FONT>
<BR><FONT SIZE=3D2>aspx page to send them to?</FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>> This seems to be the same problem that asp had
- one set of code to one</FONT>
<BR><FONT SIZE=3D2>set</FONT>
<BR><FONT SIZE=3D2>> of HTML. I'd like to know how best to get
around this without using a</FONT>
<BR><FONT SIZE=3D2>> client-side redirect via HTTP (an unnecessary
hit for the user).</FONT>
</P>
<P><FONT
SIZE=3D2>---------------------------------------------------------------
-------</FONT>
</P>
<P><FONT SIZE=3D2>Subject: RE: FW: Re: Webforms and multiple
pages</FONT>
<BR><FONT SIZE=3D2>From: "Benjamin Smith"
<visual_ben@h...></FONT>
<BR><FONT SIZE=3D2>Date: Tue, 07 Aug 2001 14:39:25 +0000</FONT>
<BR><FONT SIZE=3D2>X-Message-Number: 3</FONT>
</P>
<P><FONT SIZE=3D2>yes you're right</FONT>
</P>
<P><FONT SIZE=3D2>i think its a fundamental thing that you can't do
with dot net and that any </FONT>
<BR><FONT SIZE=3D2>server side actions have to be posted back to the
same page.</FONT>
</P>
<P><FONT SIZE=3D2>I am still confused in light of this how you are
supposed to use the code </FONT>
<BR><FONT SIZE=3D2>behind pages...a seperate class for every page seems
silly because many </FONT>
<BR><FONT SIZE=3D2>pages contain the same elements and you dont want to
rewrite these elements </FONT>
<BR><FONT SIZE=3D2>for each class. I was a big fan of include
structures but with codebehind </FONT>
<BR><FONT SIZE=3D2>iam not sure how these fit in.</FONT>
</P>
<P><FONT SIZE=3D2>I find myself repeating code in classes in codebehind
pages and also in the </FONT>
<BR><FONT SIZE=3D2>aspx pages. you can only have one server side form
per page also which is a </FONT>
<BR><FONT SIZE=3D2>limitation becuase although you can have multiple
input elements and buttons </FONT>
<BR><FONT SIZE=3D2>the 'enter' button will default to the first element
on the form. so when </FONT>
<BR><FONT SIZE=3D2>the user hits enter it will submit the first
'virtual form' even thought the </FONT>
<BR><FONT SIZE=3D2>users focus is on another one.</FONT>
</P>
<P><FONT SIZE=3D2>any ideas?</FONT>
</P>
<P><FONT SIZE=3D2>Ben</FONT>
</P>
<P><FONT SIZE=3D2>ps doesnt a seperate class for each page negate code
reusability or can you </FONT>
<BR><FONT SIZE=3D2>import multiple classes from the same
namespace</FONT>
</P>
<BR>
<BR>
<BR>
<P><FONT SIZE=3D2>>From: Robert Seber
<robert.seber@n...></FONT>
<BR><FONT SIZE=3D2>>Reply-To: "ASPX_Professional"
<aspx_professional@p...></FONT>
<BR><FONT SIZE=3D2>>To: "ASPX_Professional"
<aspx_professional@p...></FONT>
<BR><FONT SIZE=3D2>>Subject: [aspx_professional] RE: FW: Re:
Webforms and multiple pages</FONT>
<BR><FONT SIZE=3D2>>Date: Tue, 7 Aug 2001 09:12:51 +0100</FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>>To be honest I haven't tested this, but I
suspect that it won't cure</FONT>
<BR><FONT SIZE=3D2>>Benjamin's problem. Benjamin wants to
access the controls in one ASPX from</FONT>
<BR><FONT SIZE=3D2>>another ASPX without resorting to Response or
Request. Pages run with</FONT>
<BR><FONT SIZE=3D2>>Server.Execute still won't be able to see
objects in another ASPX.</FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>>Rob.</FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>>From: FAROI, David [<A
HREF=3D"mailto:David.FAROI@A...">mailto:David.FAROI@A...
.com</A>]</FONT>
<BR><FONT SIZE=3D2>>Sent: Monday, August 06, 2001 3:25 PM</FONT>
<BR><FONT SIZE=3D2>>To: ASPX_Professional</FONT>
<BR><FONT SIZE=3D2>>Subject: [aspx_professional] RE: FW: Re:
Webforms and multiple pages</FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>>Hi,</FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>>I use the following code to do something like
redirect command.</FONT>
<BR><FONT SIZE=3D2>>I use "pseudo-frame" to all my
pages.</FONT>
<BR><FONT SIZE=3D2>>In fact, my page is a big table with separate TD
and TR tag</FONT>
<BR><FONT SIZE=3D2>>(top,left,middle,right and bottom frames
like)</FONT>
<BR><FONT SIZE=3D2>>I separate my page to 5 aspx files which will be
included in a single page</FONT>
<BR><FONT SIZE=3D2>>called "index.aspx" (see source code
below) at runtime:</FONT>
<BR><FONT SIZE=3D2>><!-- #include
virtual=3D"Inc\Imports.aspx" --></FONT>
<BR><FONT SIZE=3D2>><%
Server.Execute("Inc\MenuTop.aspx") %></FONT>
<BR><FONT SIZE=3D2>><%
Server.Execute("Inc\MenuLeft.aspx") %></FONT>
<BR><FONT SIZE=3D2>><%</FONT>
<BR><FONT SIZE=3D2>> Dim
FileSpec as string</FONT>
<BR><FONT SIZE=3D2>> Select Case
Session("idR")</FONT>
<BR><FONT SIZE=3D2>>
Case "2" :
FileSpec =3D "SubShowDetails.aspx"</FONT>
<BR><FONT SIZE=3D2>>
Case Else : FileSpec =3D
"Subsidiary.aspx"</FONT>
<BR><FONT SIZE=3D2>> End
Select</FONT>
<BR><FONT SIZE=3D2>>
Server.Execute(FileSpec)</FONT>
<BR><FONT SIZE=3D2>>%></FONT>
<BR><FONT SIZE=3D2>><%
Server.Execute("Inc\MenuRight.aspx") %></FONT>
<BR><FONT SIZE=3D2>><%
Server.Execute("Inc\MenuBottom.aspx") %></FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>>The first include is to import all namespaces
needed on my web pages.</FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>>If you've got a web site with an architecture
which the same top,left,right</FONT>
<BR><FONT SIZE=3D2>>and bottom menu, this code could be very
usefull.</FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>>With this technic your pages will be loaded more
faster because only the</FONT>
<BR><FONT SIZE=3D2>>middle menu was reloaded (with redirect
capabilities).</FONT>
<BR><FONT SIZE=3D2>>I think this prevent using of frames that can
generat many errors with some</FONT>
<BR><FONT SIZE=3D2>>browser and increase site performances.</FONT>
<BR><FONT SIZE=3D2>>If you use Server.Transfer, you just have a
redirect method and I not sure</FONT>
<BR><FONT SIZE=3D2>>that script codes was executed.</FONT>
<BR><FONT SIZE=3D2>>By using Server.Execute, script codes will be
execute</FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>>I hope this will help someone to improve .net
performance.</FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>>Regards,</FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>>David FAROI</FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>>From: Robert Seber [<A
HREF=3D"mailto:robert.seber@n...">mailto:robert.seber@n...
ecisions.co.uk</A>]</FONT>
<BR><FONT SIZE=3D2>>Sent: lundi 6 ao=FBt 2001 11:08</FONT>
<BR><FONT SIZE=3D2>>To: ASPX_Professional</FONT>
<BR><FONT SIZE=3D2>>Subject: [aspx_professional] FW: Re: Webforms
and multiple pages</FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>>Here's a previous solution to this problem
(below). It works, but as a</FONT>
<BR><FONT SIZE=3D2>>solution it's not very scalable (imagine a site
with 400 pages - 400</FONT>
<BR><FONT SIZE=3D2>>panels?).</FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>>The problem you are facing is a very common
one. A couple of other</FONT>
<BR><FONT SIZE=3D2>>suggestions I've seen suggest overriding the
HTTP parser, using</FONT>
<BR><FONT SIZE=3D2>>Server.Transfer or using Response.Redirect, all
of which have their own</FONT>
<BR><FONT SIZE=3D2>>issues.</FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>>I'm keeping my fingers crossed and hope that
Microsoft come up with a clean</FONT>
<BR><FONT SIZE=3D2>>solution to the problem for the final
release.</FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>>Rob.</FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>>From: ankurs@s... [<A
HREF=3D"mailto:ankurs@s...">mailto:ankurs@s...</A>]</FONT>
<BR><FONT SIZE=3D2>>Sent: Monday, June 04, 2001 7:44 PM</FONT>
<BR><FONT SIZE=3D2>>To: ASPX_Professional</FONT>
<BR><FONT SIZE=3D2>>Subject: [aspx_professional] Re: Webforms and
multiple pages</FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>>Hi,</FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>>This may be a possible solution to your problem.
Instaed of having 3</FONT>
<BR><FONT SIZE=3D2>>pages, code all of them in one .aspx page. YOu
can assign each sections</FONT>
<BR><FONT SIZE=3D2>>html a panel id and make it conditionally
visible.</FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>>To make it more clear,</FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>>For your display part of .aspx page,</FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>>1) divide each of the three sections into three
panels, each having a</FONT>
<BR><FONT SIZE=3D2>>unique Id (asp.net supports this). Only one
panel is visible at a time.</FONT>
<BR><FONT SIZE=3D2>>When the post button is clicked, the code behind
the page is checked.</FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>>For the code behind</FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>>1) On receiving the posted contents of teh form,
check which of your 3</FONT>
<BR><FONT SIZE=3D2>>conditions is true. Set the visibility of the
other 2 panel Id's as false</FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>>This avoids a response.redirect to other
pages.</FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>>You can find an example on making panel id's
invisible at asp101.com and</FONT>
<BR><FONT SIZE=3D2>>4guysfromrolla.com</FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>>Hope this helps,</FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>>Ankur</FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>> > I'm having a problem producing a multi
outcome site with webforms.</FONT>
<BR><FONT SIZE=3D2>>For example:</FONT>
<BR><FONT SIZE=3D2>> ></FONT>
<BR><FONT SIZE=3D2>> > User fills out a form on a page (1).
If they fill out the form</FONT>
<BR><FONT SIZE=3D2>>incorrectly</FONT>
<BR><FONT SIZE=3D2>> > they are returned to page 1 with a message
prompting them to correct the</FONT>
<BR><FONT SIZE=3D2>> > error. If they fill out the form correctly
they are sent to a results</FONT>
<BR><FONT SIZE=3D2>>page</FONT>
<BR><FONT SIZE=3D2>> > (2). If they are not yet logged in
they are sent to page 3. My problem</FONT>
<BR><FONT SIZE=3D2>>is</FONT>
<BR><FONT SIZE=3D2>> > this: How do I send them to the
correct page without knowing which</FONT>
<BR><FONT SIZE=3D2>>aspx page to send them to?</FONT>
<BR><FONT SIZE=3D2>> ></FONT>
<BR><FONT SIZE=3D2>> > This seems to be the same problem that asp
had - one set of code to one</FONT>
<BR><FONT SIZE=3D2>>set</FONT>
<BR><FONT SIZE=3D2>> > of HTML. I'd like to know how best
to get around this without using a</FONT>
<BR><FONT SIZE=3D2>> > client-side redirect via HTTP (an
unnecessary hit for the user).</FONT>
</P>
<BR>
<BR>
<P><FONT SIZE=3D2>---</FONT>
</P>
<P><FONT SIZE=3D2>END OF DIGEST</FONT>
</P>
<P><FONT SIZE=3D2>---</FONT>
<BR><FONT SIZE=3D2>Search the best ASP Web sites using CodeHound! <A
HREF=3D"http://www.codehound.com"
TARGET=3D"_blank">http://www.codehound.com</A></FONT>
<BR><FONT SIZE=3D2>Now it's easy to find ASP source code on the
Internet. CodeHound's free</FONT>
<BR><FONT SIZE=3D2>search engine will categorize your results and even
search for ASP code</FONT>
<BR><FONT SIZE=3D2>compressed in Zip files on the Internet. Stop
searching dozens of</FONT>
<BR><FONT SIZE=3D2>different sites to find what you want...try
CodeHound right now!</FONT>
<BR><FONT SIZE=3D2>---</FONT>
<BR><FONT SIZE=3D2>You are currently subscribed to aspx_professional
as: clertem@i...</FONT>
<BR><FONT SIZE=3D2>
$subst('Email.Unsub')</FONT>
</P>
</BODY>
</HTML>
|
|
 |