response write and web form

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

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.
 
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)

| 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
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top