Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > losing data

Reply
Thread Tools

losing data

 
 
Lloyd Dupont
Guest
Posts: n/a
 
      02-11-2006
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 **** me off, send me
money.


 
Reply With Quote
 
 
 
 
Lloyd Dupont
Guest
Posts: n/a
 
      02-11-2006
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:...
> 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 **** me off, send me
> money.
>
>



 
Reply With Quote
 
 
 
 
Teemu Keiski
Guest
Posts: n/a
 
      02-11-2006
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:...
> 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 **** me off, send me
> money.
>
>



 
Reply With Quote
 
Lloyd Dupont
Guest
Posts: n/a
 
      02-11-2006
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" <> wrote in message
news:uMAED%...
> 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:...
>> 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 **** me off, send me
>> money.
>>
>>

>
>



 
Reply With Quote
 
Lloyd Dupont
Guest
Posts: n/a
 
      02-11-2006
Found it, I add some control without ID and that was, somehow, causing the
problem....

"Lloyd Dupont" <net.galador@ld> wrote in message
news:%...
> 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:...
>> 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 **** me off, send me
>> money.
>>
>>

>
>
>



 
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
Regex losing <br> (different from the earlier topic about losing $1) Jason C Perl Misc 4 06-26-2012 10:29 PM
Losing Drives - Finding Drives - Losing Drives mel@no.spam.com Computer Support 2 09-21-2007 10:16 PM
Response Filter losing data when response is buffered Brad ASP .Net 3 02-19-2004 01:13 AM
Re: Session Losing Data Mark MacRae ASP .Net 0 07-18-2003 07:04 PM
Re: Losing Form data Victor Garcia Aprea [MVP] ASP .Net 0 06-25-2003 10:12 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