S
Steven
This one should be a fairly simple one for you guys. I want to create a
small dropDown list (custom control) and when the user selects anyone of the
value, the control should pass back the Selected Value. This is what I did
till now and I do not know how to pass back the selected value .. Please
help
public class DDControl : System.Web.UI.WebControls.WebControl,
IPostBackEventHandler
{
protected override void Render(HtmlTextWriter output)
{
string s1 = "<SELECT NAME=\"pizzasize\">" ;
string s2 = "<OPTION VALUE=\"s\">" ;
string s3 = "small";
string s4 = "<OPTION VALUE=\"m\">" ;
string s5 = " medium" ;
string s6 = "<OPTION VALUE=\"l\">" ;
string s7 = "large" ;
string s8 = "</SELECT>" ;
output.Write(s1+s2+s3+s4+s5+s6+s7+s8) ;
}
public event EventHandler DropDownChange;
public void RaisePostBackEvent(string eventArgument)
{
OnDropDownChange(EventArgs.Empty);
}
protected virtual void OnDropDownChange(EventArgs e)
{
if (DropDownChange != null)
{
DropDownChange(this, e);
}
}
}
Thanks
Steven
small dropDown list (custom control) and when the user selects anyone of the
value, the control should pass back the Selected Value. This is what I did
till now and I do not know how to pass back the selected value .. Please
help
public class DDControl : System.Web.UI.WebControls.WebControl,
IPostBackEventHandler
{
protected override void Render(HtmlTextWriter output)
{
string s1 = "<SELECT NAME=\"pizzasize\">" ;
string s2 = "<OPTION VALUE=\"s\">" ;
string s3 = "small";
string s4 = "<OPTION VALUE=\"m\">" ;
string s5 = " medium" ;
string s6 = "<OPTION VALUE=\"l\">" ;
string s7 = "large" ;
string s8 = "</SELECT>" ;
output.Write(s1+s2+s3+s4+s5+s6+s7+s8) ;
}
public event EventHandler DropDownChange;
public void RaisePostBackEvent(string eventArgument)
{
OnDropDownChange(EventArgs.Empty);
}
protected virtual void OnDropDownChange(EventArgs e)
{
if (DropDownChange != null)
{
DropDownChange(this, e);
}
}
}
Thanks
Steven