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

losing data

On my web page I have a custom control developed in a C# library.
Somehow when I post the page, the user input disappears.
I override OnLoad() and check the value of my inputText.Text just before and
after base.OnLoad() and the user entered text never even seems to reach my
TextBox, although the ID property looks alright, and consistent.

Any tips on how to investigate this bug? or what could be the cause of it?

--
I have taken a vow of poverty. If you want to really piss me off, send me
money.
Feb 11 '06 #1
4 1293
Really weird...
I have setup an event listener to the Load event of my text box and its Text
propert is still ""
although I have also checked Context.Request.Params[tTitle.UniqueID] and it
does contains the user value....
how comes my TextBox's Text is not updated?
Any ideas?

"Lloyd Dupont" <net.galador@ld> wrote in message
news:OT**************@TK2MSFTNGP11.phx.gbl...
On my web page I have a custom control developed in a C# library.
Somehow when I post the page, the user input disappears.
I override OnLoad() and check the value of my inputText.Text just before
and after base.OnLoad() and the user entered text never even seems to
reach my TextBox, although the ID property looks alright, and consistent.

Any tips on how to investigate this bug? or what could be the cause of it?

--
I have taken a vow of poverty. If you want to really piss me off, send me
money.

Feb 11 '06 #2
Hi,

can you post a small sample snippet to demonstrate what you are doing?

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke

"Lloyd Dupont" <net.galador@ld> wrote in message
news:OT**************@TK2MSFTNGP11.phx.gbl...
On my web page I have a custom control developed in a C# library.
Somehow when I post the page, the user input disappears.
I override OnLoad() and check the value of my inputText.Text just before
and after base.OnLoad() and the user entered text never even seems to
reach my TextBox, although the ID property looks alright, and consistent.

Any tips on how to investigate this bug? or what could be the cause of it?

--
I have taken a vow of poverty. If you want to really piss me off, send me
money.

Feb 11 '06 #3
err...
Allright...
The proble is with Comment.tTitle, it's always empty. Also my event hadler
DoSomething is never called.
And nowhere I'm writing tTitle.Text = "";, so how could it be?

something like that:
=== MyPage.aspx ===
........
<my:MyControl runat=server />
==MyControl.cs ==
class MyControl : Control, INamingContainer
{
Entry entry;
Comment comments;
protected override void CreateChildControls()
{
base.CreateChildControls();
Controls.Add(entry = new Entry());
ControlsAdd(comments = new Comment());
}
.......
}
== Entry.cs ==
class Entry : Control, INamingContainer
{
.....
}
== Comment.cs ==
class Comment : Control, INamingContainer
{
TextBox tTitle;
Button submit;
protected override void CreateChildControls()
{
base.CreateChildControls();
Controls.Add(tTitle = new TextBox());
tTitle.ID = "tTitle";

RequiredFieldValidator rfv = new RequiredFieldValidator();
rfv.ErrorMessage = "Required";
rfv.ControlToValidate = "tTitle";
Controls.Add(tTitle);

Controls.Add(submit = new Button());
submit.Text = submit;
submit.Clik += DoSomething();
......
}
void DoSomething(object sender, EventArgs e)
{
....
}
}
=============
"Teemu Keiski" <jo****@aspalliance.com> wrote in message
news:uM****************@TK2MSFTNGP12.phx.gbl...
Hi,

can you post a small sample snippet to demonstrate what you are doing?

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke

"Lloyd Dupont" <net.galador@ld> wrote in message
news:OT**************@TK2MSFTNGP11.phx.gbl...
On my web page I have a custom control developed in a C# library.
Somehow when I post the page, the user input disappears.
I override OnLoad() and check the value of my inputText.Text just before
and after base.OnLoad() and the user entered text never even seems to
reach my TextBox, although the ID property looks alright, and consistent.

Any tips on how to investigate this bug? or what could be the cause of
it?

--
I have taken a vow of poverty. If you want to really piss me off, send me
money.


Feb 11 '06 #4
Found it, I add some control without ID and that was, somehow, causing the
problem....

"Lloyd Dupont" <net.galador@ld> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
I'm narrowing on the culprit.
I have an HideBox control (attached) and it is those TextBox inside it
which are loosing data.
I have yet to figure out why...

"Lloyd Dupont" <net.galador@ld> wrote in message
news:OT**************@TK2MSFTNGP11.phx.gbl...
On my web page I have a custom control developed in a C# library.
Somehow when I post the page, the user input disappears.
I override OnLoad() and check the value of my inputText.Text just before
and
after base.OnLoad() and the user entered text never even seems to reach
my
TextBox, although the ID property looks alright, and consistent.

Any tips on how to investigate this bug? or what could be the cause of
it?

--
I have taken a vow of poverty. If you want to really piss me off, send me
money.


Feb 11 '06 #5

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

Similar topics

1
by: Scott Lyon | last post by:
I'm maintaining (read: I didn't write it, nor do I have the time to spend to rewrite it) an application that is suddenly giving me grief. The reason I say suddenly, is because we're in the...
32
by: Neil Ginsberg | last post by:
We're using SQL Server 7 with an Access 2000 MDB as a front end with ODBC linked tables. I recently created a new set of tables for the app, and users are complaining that unsaved data is being...
6
by: Nad | last post by:
Hello, I need some help with this: I am trying to update some data using XmlTextWriter. I instantiate first and then do some validation and then copy data into the dataset. Finally I commit...
5
by: fbwhite | last post by:
I know this issue has been brought up many times, but I have tried many of the solutions to no avail. I wanted to give my specific case to see if someone could be of any help. We are using the...
9
by: Adrian Parker | last post by:
We have a website that works everywhere but on a few PCs on this one site.. Asp.Net 1.1 Server = Windows 2003 Client = XP In the web.config we use - cookieless="false" in the browser settings...
7
by: Mike | last post by:
While working on a few projects I have this annoying issue whereby my computer is losing the connection to my SQL database. I have to save my work exit VS log out of windowsXP and log back in,...
2
by: RRoma | last post by:
Does anybody know how I can import lists of numbers from Excel into Access without losing the preceeding Zeros??? The field must have a total of 10 digits.... Is this a function of how its saved in...
7
by: DaTurk | last post by:
Hi, I'm trying to send a large number of messages to a UDP multicast group with which I have one client subscribed. But I'm losing mesages, and I'm not entirely sure why. I can't seem to find...
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: 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
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...
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
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.