Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Help me. I'm stuck with this web control problem....

Reply
Thread Tools

Help me. I'm stuck with this web control problem....

 
 
Henry
Guest
Posts: n/a
 
      12-29-2004
I have this problem and I don't know what I can do. First of all, I have a
page with [ok] and [cancel] button, and 5 <asp:TextBox>'s and when an user
makes changes to each of the textbox content, javascript client side code is
triggered to change the textbox background color property to some other
color. My problem is when I click on the save button(server side), I get a
pop up window (like a message box but it's just a another browser) that ask
if you would like to save. At this point, if [cancel] is selected, the window
will close and the original page with those textbox will show. However, all
the colors that were changed by client side code is now lost because of
postback to server. Is there anyway to keep the textbox control's property
such as (textbox1.style.backgroundColor) when performing postback. What I
tried so far is to store each of the control's name in hidden value
("textbox1;textbox4") but, can't do anything about it further once I have it
on the server side. Is there any other way to achieve this. Any help would
be appreciated. Thanks.

Henry
 
Reply With Quote
 
 
 
 
John Saunders
Guest
Posts: n/a
 
      12-30-2004
"Henry" <> wrote in message
news:F397F3C1-04B9-42CD-ABBE-...
>I have this problem and I don't know what I can do. First of all, I have a
> page with [ok] and [cancel] button, and 5 <asp:TextBox>'s and when an user
> makes changes to each of the textbox content, javascript client side code
> is
> triggered to change the textbox background color property to some other
> color. My problem is when I click on the save button(server side), I get
> a
> pop up window (like a message box but it's just a another browser) that
> ask
> if you would like to save. At this point, if [cancel] is selected, the
> window
> will close and the original page with those textbox will show. However,
> all
> the colors that were changed by client side code is now lost because of
> postback to server. Is there anyway to keep the textbox control's
> property
> such as (textbox1.style.backgroundColor) when performing postback. What I
> tried so far is to store each of the control's name in hidden value
> ("textbox1;textbox4") but, can't do anything about it further once I have
> it
> on the server side. Is there any other way to achieve this. Any help
> would
> be appreciated. Thanks.


Don't just store the control name - also store the color you changed it to.
Then, in the ServerChange event handler of the HtmlInputHidden control, you
can change the color of the textbox.

John Saunders


 
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
HELP! STUCK! HOW DO I EXPOSE ALL PROPERTIES OF A CHILD CONTROL Ryan ASP .Net Web Controls 0 03-23-2007 02:54 AM
Really Stuck on a Canlendar Control PLEASE HELP!!! Midway ASP .Net Web Controls 6 09-01-2006 08:46 AM
A bit stuck with properties in a user control Alan Silver ASP .Net 8 02-22-2005 04:52 PM
accessing the web user control's control from a web page and set a value from another web page Reny J Joseph Thuthikattu ASP .Net 1 12-30-2004 12:21 PM
Stuck with launching IE from Web App James N ASP .Net 2 10-26-2004 12:30 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