473,396 Members | 1,871 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

color Lost between postbacks....

My development environment is ASP.Net with VB.Net and .Net Framework 1.1.

For a web control text box through client code(java script) I am changing
the font color.

After post the color is not retaining.

Do I have to change some properties to retain the color between postbacks ?

TextBox.EnableViewState is set to TRUE.

Please advice.

Thanks,

Nelson


Nov 18 '05 #1
3 1406
Hi Nelson,

If you change properties of a server-side control using client-side script,
the server-side logic doesn't know what you've done. Therefore, doesn't add
it to the viewstate and the changes are not retained.

In this case, you need to persist the value yourself and apply it whenever
the page is refreshed.
"Nelson" <Ne*************@hotmail.com> wrote in message
news:uC**************@tk2msftngp13.phx.gbl...
My development environment is ASP.Net with VB.Net and .Net Framework 1.1.

For a web control text box through client code(java script) I am changing
the font color.

After post the color is not retaining.

Do I have to change some properties to retain the color between postbacks
?

TextBox.EnableViewState is set to TRUE.

Please advice.

Thanks,

Nelson


Nov 18 '05 #2
Ken,
But the value will be retained across postbacks?
Is it corrcet?
Thanks,
Nelson

"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message
news:ea**************@TK2MSFTNGP15.phx.gbl...
Hi Nelson,

If you change properties of a server-side control using client-side script, the server-side logic doesn't know what you've done. Therefore, doesn't add it to the viewstate and the changes are not retained.

In this case, you need to persist the value yourself and apply it whenever
the page is refreshed.
"Nelson" <Ne*************@hotmail.com> wrote in message
news:uC**************@tk2msftngp13.phx.gbl...
My development environment is ASP.Net with VB.Net and .Net Framework 1.1.
For a web control text box through client code(java script) I am changing the font color.

After post the color is not retaining.

Do I have to change some properties to retain the color between postbacks ?

TextBox.EnableViewState is set to TRUE.

Please advice.

Thanks,

Nelson

Nov 18 '05 #3
Hi Nelson,

Yes, the value can be retained across postbacks if you do something to
preserve it on the server-side.

Otherwise, ASP.NET can't help you because it doesn't know what you've
changed with the client script.

One technique would be to have a hidden server-side field and store the
colour. Of course, on page load you have to look up the colour and apply it
again to the textbox.
"Nelson" <Ne*************@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Ken,
But the value will be retained across postbacks?
Is it corrcet?
Thanks,
Nelson


Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jim Mitchell | last post by:
OK, have I come full circle.... ? 1) .NET with VS Studio seemed to be the answer to all my prayers. A) No more worries about coding for Netscape vs. IE. B) Quick Deployment C) All code in...
6
by: Jon Maz | last post by:
Hi All, I am experimenting with URL Rewriting using the techniques outlined by Scott Mitchell in his article "URL Rewriting in ASP.NET"...
1
by: Jeffrey Kelso | last post by:
I am having an issue where doing a PostBack in ASP.NET is losing the form information. This is happening in a NLB environment with two servers using Application Center When a user selects an...
3
by: Celine | last post by:
I have a webform with multiple panels with textboxes, dropdownlists, radiobuttonlists, etc. The user navigates through the panels and then submits the information at the end. The first panel...
0
by: gregfocker | last post by:
I installed the new RTM version of ASP.NET 2.0 AJAX Extensions 1.0 released on Tuesday (1/23). I made the required changes to the web.config file to go from the RC version to the RTM version. ...
4
by: Frank | last post by:
Hello everyone, I have a problem that the window.opener variable is lost once my popup page has a postback. On multiple pages they address this problem but I cannot find a correct answer. ...
1
by: Kursat | last post by:
Hi, I have a question about Ajax postbacks : - Does ASP.NET process multiple UpdatePanel postbacks in single thread when two or more different update panel postbacks occur at the same time for...
4
by: TS | last post by:
I am losing my colgroup html element of a table that i toggle back and forth of being visible=true/false. is there any workaround since the rendered html doesn't contain it even though it has not...
4
by: Nathan Sokalski | last post by:
I have 2 private variables in my class that I need to remember the values of between postbacks (or actually callbacks, since I am using AJAX). I want to avoid using session variables, if possible....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.