Response.Write versus output.Write-render method
Hi,
What is the difference between response.writing a control onto a page, versus creating a WCC that has a render method, and doing something like this....
code Code:
Protected Overrides Sub Render(ByVal output As System.Web.UI.HtmlTextWriter)
output.WriteBeginTag("input type = 'button'")
output.WriteAttribute("value", "close me")
output.WriteAttribute("onclick", "javascript: closeme();")
output.WriteEndTag("input")
End Sub
Re: Response.Write versus output.Write-render method
The difference is how and where you write them, the similarity is the unmaintainability and inflexibility of the code created.
Response.Write writes to the stream at the point at which it is called in code, so the text can show up anywhere. Render()->output.write... is more controlled in that it is called when it is invoked at a point that you, the developer want. A web user control acts as a proper ASP.NET control and separates the UI from the UI logic and is rendered at the position it is placed in on the page.
Re: Response.Write versus output.Write-render method
Re: Response.Write versus output.Write-render method
That's what she said to me... before she took my house. :cry: