Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Client Side changes not refecting server side label

Reply
Thread Tools

Client Side changes not refecting server side label

 
 
=?Utf-8?B?U3Jpbmk=?=
Guest
Posts: n/a
 
      02-19-2004
I have a server side label and text box
From the client side I am changing the value of the ASP.NET labe
using the innerText property of the label.
When I try to access the label from the server side I am getting the old valu
of the label which was initially populated before calling the java script function .
Can anyone tell me what is going wrong

Regards
Srini
 
Reply With Quote
 
 
 
 
Rajiv R
Guest
Posts: n/a
 
      02-19-2004
Hi Srini

If you understand how data is sent to the server when you submit is form on
a page, you will realise that the form elements (<input>,<select>) is sent
as a querystring or as name-value pairs.

labels are not form elements and this is not send/postedback to the server.

what you may do is have a hidden form element and update it with the same
value as u set ur label to and access the hidden form element in your
server.

hope that helps
--
Cheers!
Rajiv. R
Rajspace.Org

"Srini" <> wrote in message
news:025753D7-1A1A-481C-861B-...
> I have a server side label and text box.
> From the client side I am changing the value of the ASP.NET label
> using the innerText property of the label.
> When I try to access the label from the server side I am getting the old

value
> of the label which was initially populated before calling the java script

function .
> Can anyone tell me what is going wrong.
>
> Regards,
> Srini



 
Reply With Quote
 
 
 
 
Rajiv R
Guest
Posts: n/a
 
      02-20-2004
Hi Ajax,

Could you elaborate?

--
Cheers!
Rajiv. R
Rajspace.Org

"Ajax" <> wrote in message
news:48C1E5E6-3598-4ADB-9A1B-...
> I'm agree with the hidden control solution for the label problem but I

still have the same problem with the select.


 
Reply With Quote
 
=?Utf-8?B?YWpheA==?=
Guest
Posts: n/a
 
      02-21-2004
Sorry,
I have 2 listbox server controls in my page and I want to interchange items between them. One solution could be make the interchange in the server, another could be make it in the client. When I tried to achieved client solution I made the changes in "select" that result from the "listbox" on the server, and when a post was made it I got the original listbox without any of changes I made

Thanks for your attention.
 
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
How change Label's Text value in client side and postback to Server? jiatiejun ASP .Net Web Controls 1 07-25-2007 02:16 PM
Server side access the text of <asp:label> changed by client side javascript code? nick ASP .Net Web Controls 1 12-23-2004 04:18 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 changes on the client side aren't reflected on the server side Joe Abou Jaoude ASP .Net Web Controls 2 11-18-2004 12:21 PM
client side scripting changes to be reflected back to server Sumit ASP .Net 1 10-16-2003 04:17 PM



Advertisments