WebCustomControl Problem

H

Hemant

Hi,

I have created a webcostomcontrol and add one property "Xyz". That
custome control is inherited from TextBox class.

[Bindable(true)]
[Category("Appearance")]
[DefaultValue("")]
[Localizable(true)]
public string Xyz
{
get
{
String s = (String)ViewState["Xyz"];
return ((s == null) ? String.Empty : s);
}
set
{
ViewState["Xyz"] = value;
}
}


and i have set the value for Xyz from client script like

<script Language='javascript'>
function setvalue()
{
form1.txt.Xyz = "Some Text";
}
</script>

on postback i want the value which is set from clientscript.
but i cant get the updated value for Xyz.
Is there another way to set the value from clientscript and get it at
serverside?
Or we cant get the value which is set by client script. do i need to
use hidden textbox to get the value?

Thanx in advance.

Hemant Mane.
 

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

Members online

Forum statistics

Threads
473,765
Messages
2,569,568
Members
45,042
Latest member
icassiem

Latest Threads

Top