Groups | Blog | Home
all groups > asp.net building controls > may 2006 >

asp.net building controls : get control properties after postback


mr. App
5/14/2006 4:15:18 PM
I know how to create a custom control by using the Render method. the
question is, if I have 2 properties, for example:
protected override void Render(HtmlTextWriter output)
{
output.Write("<input type=text name=" + this.UniqueID + " ");
output.Write("value=" + this.value + " text=" + this.Text);
}

the question is how to I get the new values of this.value and this.text
properties after postback?

Thanks

Steve C. Orr [MVP, MCSD]
5/15/2006 3:31:59 PM
Look in the Form collection. Try code similar to this:

string s = Request.Form(this.UniqueID).ToString();

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net



[quoted text, click to view]

mr. App
5/16/2006 12:00:00 AM
Thanks!

[quoted text, click to view]

AddThis Social Bookmark Button