By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,713 Members | 1,243 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,713 IT Pros & Developers. It's quick & easy.

response write and web form

P: n/a
Is there a way to combine the use of a web form and the Response.Write
method? I am creating a search page with 1000's of results. The results
are to large to buffer so I want to use the response.write with buffering
tuned off. When I do this the results always shows before the form.

Any suggestions.

--
Bill
Nov 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
no direct way. turn off buffering. create a simple server control that
renders your search results. in its render event you can write out your
seach results with a simple write. you can declare the control in your code
behind page, pass it the page, and it can call the page methods to do the
query.

in your page declare

public class SearchResults : WebControl
{
protected override void Render(HtmlTextWriter output)
{
MyPage myPage = (MyPage) Page;
myPage.RenderSeachResults();
}
}

in the codebehind, create the control, add the control to a place holder on
the page, and your done

-- bruce (sqlwork.com)

"Bill" <ms****@hotmail.com> wrote in message
news:uy**************@TK2MSFTNGP14.phx.gbl...
| Is there a way to combine the use of a web form and the Response.Write
| method? I am creating a search page with 1000's of results. The results
| are to large to buffer so I want to use the response.write with buffering
| tuned off. When I do this the results always shows before the form.
|
| Any suggestions.
|
| --
| Bill
|
|
Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.