Instead of using response.write, try putting a placeholder control in the
form and putting your output there (without the "HTML" tags").  Or, better
yet, put an XML (server control) control in the form tag to do your
transformation.

HTH,
Matt

-----Original Message-----
From: Bailey, Mark [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 14, 2002 5:33 AM
To: [EMAIL PROTECTED]
Subject: [DOTNET] Page.IsPostBack


I have an .aspx page that is completely blank (at design time).  At runtime
I use an xslt transformation to render the html using Response.Write(...).
The page looks exactly as intended, but for some reason when I submit the
page (to itself using the POST method) Page.IsPostBack is always false -
WHY?

When I view the source of the rendered page it has the html from the
transformation, but also some appended html (sample pasted below).  The
Submit button is obviously in the first HTML block... is this what is
confusing the page?  FWIW, I do get all of the control values posted (so I
know that the post is working to itself).

<HTML>
        ..... html from xslt ....
</HTML>

<HTML>
        <HEAD>
                <title>getreport</title>
                <meta name="GENERATOR" content="Microsoft Visual Studio.NET
7.0">
                <meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
                <meta name="vs_defaultClientScript" content="JavaScript">
                <meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5";>
        </HEAD>
        <body MS_POSITIONING="GridLayout">
                <form name="Form1" method="post" action="getreport.aspx"
id="Form1"> <input type="hidden" name="__VIEWSTATE"
value="dDwtMTI3OTMzNDM4NDs7PrkMTRdhokN4y6rkcPagTS7knusi" />

                </form>
        </body>
</HTML>

Thanks,
Mark.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to