Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Persisting Label/Select Box Control values changed from client side during Postback

Reply
Thread Tools

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

 
 
Server Control
Guest
Posts: n/a
 
      12-07-2005
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

 
Reply With Quote
 
 
 
 
KJ
Guest
Posts: n/a
 
      12-08-2005
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.

 
Reply With Quote
 
 
 
 
KJ
Guest
Posts: n/a
 
      12-08-2005
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.

 
Reply With Quote
 
KJ
Guest
Posts: n/a
 
      12-08-2005
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.

 
Reply With Quote
 
KJ
Guest
Posts: n/a
 
      12-08-2005
Sorry about the extra posts. Google groups is not working too well.
Maybe someone here can help them out

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dropdown Selection Changed Problem in Repeater Control during Postback of page bhavesh ASP .Net Web Controls 1 01-19-2007 04:17 AM
Dropdown Selection Changed Problem in Repeater Control during Postback of page bhavesh ASP .Net Web Controls 0 01-18-2007 10:31 AM
server side code access the text of <asp:label> changed by client-side javascript code? nick ASP .Net 3 12-15-2004 06:26 PM
ListBox items changed client-side are not available server-side Valerian John ASP .Net 6 05-17-2004 06:45 PM
Re: Access control values changed via Client-Side Javascript John Saunders ASP .Net 0 08-29-2003 12:16 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57