how to parse changes to control attributes by javascript at post back

  • Thread starter Thread starter Jeremy Chapman
  • Start date Start date
J

Jeremy Chapman

I've created a custom control which outputs html at runtime like <span
id="controlid" value="myvalue"></span>. On my page I have javascript that
changes the value of the value attribute. On post back I want to parse the
html changed by the javascript and update a server side variable. I thought
this could be done in by the adding IPostBackDataHander interface to my
classes inheritance, and adding the IPostBackDataHandler.LoadPostData to my
class, and in the OnPreRender of my control calling
Page.RegisterRequiresPostBack(this);. My LoadPostData method gets called on
the postback but I still cant seem to get the new value of the value
attribute from the NameValueCollection. What am I doing wrong?
 
The various input types, textarea, and select.
The html button type, may be, may be not, best not
use that one as a form field.
 

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