click-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis M. J. Yerger" <>
Subject RE: Creating Pages during Postbacks
Date Thu, 01 Nov 2012 06:47:28 GMT

Thank you, Bob. Your answer makes sense. I look forward to sharing more of my thoughts on
Click in the future.

Date: Thu, 1 Nov 2012 07:42:56 +0200
Subject: Re: Creating Pages during Postbacks

Hi Dennis,

In the postback he form and fields should be created in order to process and validate the
values and persist data. I would assume that if the values were incorrect you would render
the page again to show the error messages. Only when everything is correct would you redirect
to another page.

But to answer your question you could put conditional code around constructing your controls
with either:

or if you want to know if a specific form was submitted you could create just that form and

Hope this helps.

Kind regards


On Wed, Oct 31, 2012 at 9:31 PM, Dennis M. J. Yerger <> wrote:

Those of you who are familiar with Web applications know that a page is first requested with
a HTTP GET request. If this page contains a form, the form is normally submitted back to the
same address with a POST request. This type of request is called a postback. Postbacks usually
result in redirects to a new page. But here's the problem. When a Click page is requested,
it must construct its controls before processing the request. But if the request is a postback
that results in a redirect, the controls on the original page are never rendered, which means
they are created for nothing. So my question is this: is there a way to get around constructing
controls during a postback since they will never be rendered?


View raw message