473,386 Members | 1,720 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,386 software developers and data experts.

Textbox postbax comma bug

I have a webform page that contains a textbox control. The textbox is
initialized by the codebehind module and contains a value when the page
is first
loaded. The user can then edit the textbox if they choose to or leave
it as is.

The strange behavior I'm seeing is that when the form is posted back to
the server, the textbox's text property contains the new value followed by a
comma
and then the original value. eg. if the control was initialized to
contain "Joe"
and the user deletes that value and enters "Stan" the textbox1.text
property
contains "Stan,Joe" immediately after the postback. The MaintainState
property
has no effect on this behavoir. If the user didn't touch the textbox
it would
contain "Joe,Joe" Even textboxes that were originally blank contain a
comma when
posted back.
Any idea why this is happening????
Nov 18 '05 #1
2 1537
Sounds like you have 2 Controls with the same name on the client. Are you storing a hidden input or anything else that might have the same name/id of your textbox?

-Joe

"Keith Doran" wrote:
I have a webform page that contains a textbox control. The textbox is
initialized by the codebehind module and contains a value when the page
is first
loaded. The user can then edit the textbox if they choose to or leave
it as is.

The strange behavior I'm seeing is that when the form is posted back to
the server, the textbox's text property contains the new value followed by a
comma
and then the original value. eg. if the control was initialized to
contain "Joe"
and the user deletes that value and enters "Stan" the textbox1.text
property
contains "Stan,Joe" immediately after the postback. The MaintainState
property
has no effect on this behavoir. If the user didn't touch the textbox
it would
contain "Joe,Joe" Even textboxes that were originally blank contain a
comma when
posted back.
Any idea why this is happening????

Nov 18 '05 #2
Hi Joe,

No, no hidden inputs and have checked all code and have no controls
with the same name. I'm totally at a loss.

"Joe.Dattilo" <Jo********@discussions.microsoft.com> wrote in message news:<4D**********************************@microso ft.com>...
Sounds like you have 2 Controls with the same name on the client. Are you storing a hidden input or anything else that might have the same name/id of your textbox?

-Joe

"Keith Doran" wrote:
I have a webform page that contains a textbox control. The textbox is
initialized by the codebehind module and contains a value when the page
is first
loaded. The user can then edit the textbox if they choose to or leave
it as is.

The strange behavior I'm seeing is that when the form is posted back to
the server, the textbox's text property contains the new value followed by a
comma
and then the original value. eg. if the control was initialized to
contain "Joe"
and the user deletes that value and enters "Stan" the textbox1.text
property
contains "Stan,Joe" immediately after the postback. The MaintainState
property
has no effect on this behavoir. If the user didn't touch the textbox
it would
contain "Joe,Joe" Even textboxes that were originally blank contain a
comma when
posted back.
Any idea why this is happening????

Nov 18 '05 #3

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

Similar topics

2
by: Richard Hollenbeck | last post by:
I'm getting "#Error" in a report's textbox where the control source is the following: = & (", "+) . Both lname and fname are valid field names for the table assigned as the report's...
5
by: | last post by:
Hi all, I would like to create some textbox by coding...such as ..I would like to create 10 textbox during form load. Is it use for loop to do ? ...on the other hand, is vb.net can do as the...
15
by: staeri | last post by:
I'm looping through some textboxes to sum the values. If the value in the textbox has a dot or a space as thousand separator the sum function doesn't work. Can someone help me to make it work...
1
by: D. Shane Fowlkes | last post by:
I have a asp:textbox which I've applied a javascript function to strip off all non-numeric chanarcters. The js function is triggered with the textbox's onblur attribute. I also have a...
6
by: Drum2001 | last post by:
I have a database where I need to query multiple items. Is it possible to run a query based on a textbox where the information is delimited by a comma. Example: Show me all names where...
0
by: Anonieko | last post by:
Are there any javascript codes there? Answer: Yes On the PageLoad event call InitialClientControsl as follows /// <summary> /// This will add client-side event handlers for most of the...
5
montzter
by: montzter | last post by:
Hi evryone, I'm having trouble in formatting the inputed data in the text box so that everytime user lost focus it will adjust its value to contain the format (#,####.##). ie user will input...
8
by: Mihai N. | last post by:
I need to format any decimal value so that it is right aligned, thousands It is good to show the info in the format the user prefers. That is language/locale speciffic (CultureInfo in the .NET...
3
by: premprakashbhati | last post by:
sir, how to put dynamic comma after 12 characters in textbox means 13th char is comma.... can u plz suggest me ...how i should do it... thanx... prem prakash...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.