468,170 Members | 1,982 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,170 developers. It's quick & easy.

Persisting Label/Select Box Control values changed from client side during Postback

Hi,
I have a datagrid(within a user control) that has label controls. I
have added hidden fields in the datagrid alongwitht the label control.
I do some client side editing with javascript and somehow want to reset
the label value through javascript? I could grab the id of the row that
had the label in it (now converted to a span at client side) by
accessing the corresponding hidden field with it.
var hdnLabel = rowHandle.getElementsByTagName("input");
for(var i = 0 ; i < hdnLabel.length ; i++)
{
if(hdnLabel[i].type == "hidden")
{
hdnLabel[i].value = "Some Value";
}
}

After setting this value, postback happens. Now how do i somehow
associate the value of this particular hidden variable with the label
that I want to reset at client side. At server side, i am unable to
find a wayto identify my hidden variable(since there is one per row
with clientIDs) say through Request.Form[????]. And if i grab that
value somehow where do i specify this value to my label??
I am facing a smilar problem with my dropdown in datagrid. I add List
items to it through javascript...and now when post back happens, i want
to show the items that were added as well??

Request for an urgent reply!!!!

Thanks in advance

Dec 7 '05 #1
4 1652
KJ
Hmm, I'm not sure if I understand correctly, but, perhaps you might
consider adding the new values to ViewState, then, after postback, pull
them from there again. But, as I said, I'm not sure I understand the
scenario.

Dec 8 '05 #2
KJ
Hmm, I'm not sure if I understand correctly, but, perhaps you might
consider adding the new values to ViewState, then, after postback, pull
them from there again. But, as I said, I'm not sure I understand the
scenario.

Dec 8 '05 #3
KJ
Hmm, I'm not sure if I understand correctly, but, perhaps you might
consider adding the new values to ViewState, then, after postback, pull
them from there again. But, as I said, I'm not sure I understand the
scenario.

Dec 8 '05 #4
KJ
Sorry about the extra posts. Google groups is not working too well.
Maybe someone here can help them out :)

Dec 8 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.