Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Postback failing in 1 control

Reply
Thread Tools

Postback failing in 1 control

 
 
CJ Taylor
Guest
Posts: n/a
 
      08-26-2003
Hey all,

I have a ASP.NET application running on Rainbow Portal, (the forums ahve
been kinda useless).

Anyways, I have a single control that for some reason whenever I hit the
calculate button in it (a simple link button) it will go to the event
procedure, call the proper method and then when I try to access a field in
the web control it comes up with nothing. Like the field is suddenly gone.

For example, txt_Markup is a text field, its a server control, but when I
postback, there is no value. So I checked the variables posted from the
form, not there either.

This is only happening in a single form... wondering if someone could lead
me in the right direction on where to look.

Thanks,
CJ


 
Reply With Quote
 
 
 
 
Kevin Spencer
Guest
Posts: n/a
 
      08-26-2003
Can you explain what you mean by "there is no value" - how are you
determining this? Also, what do you mean by a "field in the web control?"
Define what you mean by "field" and "web control".

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
The more I learn, the less I know.

"CJ Taylor" <> wrote in message
news:...
> Hey all,
>
> I have a ASP.NET application running on Rainbow Portal, (the forums ahve
> been kinda useless).
>
> Anyways, I have a single control that for some reason whenever I hit the
> calculate button in it (a simple link button) it will go to the event
> procedure, call the proper method and then when I try to access a field in
> the web control it comes up with nothing. Like the field is suddenly

gone.
>
> For example, txt_Markup is a text field, its a server control, but when I
> postback, there is no value. So I checked the variables posted from the
> form, not there either.
>
> This is only happening in a single form... wondering if someone could lead
> me in the right direction on where to look.
>
> Thanks,
> CJ
>
>



 
Reply With Quote
 
 
 
 
CJ Taylor
Guest
Posts: n/a
 
      08-26-2003
Alright I drop a textbox object into the web control. (User Web Control,
inherited from Rainbow.PortalModuleControl or something).

So this should maintain viewstate. that being, if I enter a value into the
textbox control, it should maintain viewstate on a postback (given I'm doing
no databinding).

However, when the postback event occurs, I should be able to reference it
with "this.txt_Markup.text" to get the text value from the postback as I do
with all my other forms.

Nope.

So if I enter text in this box, and hit my link button, which fires an event
called lnk_Calculate.Click which is handled by lnk_Calculate_Click, it works
until I try to retreive that value. And with that, it comes up with
nothing. so if I do a response.write(this.txt_Markup.Text), it shows
nothing.

Hope that helps.

CJ
"Kevin Spencer" <> wrote in message
news:...
> Can you explain what you mean by "there is no value" - how are you
> determining this? Also, what do you mean by a "field in the web control?"
> Define what you mean by "field" and "web control".
>
> --
> HTH,
>
> Kevin Spencer
> Microsoft MVP
> .Net Developer
> http://www.takempis.com
> The more I learn, the less I know.
>
> "CJ Taylor" <> wrote in message
> news:...
> > Hey all,
> >
> > I have a ASP.NET application running on Rainbow Portal, (the forums ahve
> > been kinda useless).
> >
> > Anyways, I have a single control that for some reason whenever I hit the
> > calculate button in it (a simple link button) it will go to the event
> > procedure, call the proper method and then when I try to access a field

in
> > the web control it comes up with nothing. Like the field is suddenly

> gone.
> >
> > For example, txt_Markup is a text field, its a server control, but when

I
> > postback, there is no value. So I checked the variables posted from the
> > form, not there either.
> >
> > This is only happening in a single form... wondering if someone could

lead
> > me in the right direction on where to look.
> >
> > Thanks,
> > CJ
> >
> >

>
>



 
Reply With Quote
 
Kevin Spencer
Guest
Posts: n/a
 
      08-26-2003
It's still kind of hard to follow you, but it sounds like when you say you
"drop a textbox object into the web control" you mean that you are adding a
textbox to the control's Controls Collection. If that's the case, you would
have to find the control using the parent Control's FindControl() method.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
The more I learn, the less I know.

"CJ Taylor" <> wrote in message
news:...
> Alright I drop a textbox object into the web control. (User Web Control,
> inherited from Rainbow.PortalModuleControl or something).
>
> So this should maintain viewstate. that being, if I enter a value into

the
> textbox control, it should maintain viewstate on a postback (given I'm

doing
> no databinding).
>
> However, when the postback event occurs, I should be able to reference it
> with "this.txt_Markup.text" to get the text value from the postback as I

do
> with all my other forms.
>
> Nope.
>
> So if I enter text in this box, and hit my link button, which fires an

event
> called lnk_Calculate.Click which is handled by lnk_Calculate_Click, it

works
> until I try to retreive that value. And with that, it comes up with
> nothing. so if I do a response.write(this.txt_Markup.Text), it shows
> nothing.
>
> Hope that helps.
>
> CJ
> "Kevin Spencer" <> wrote in message
> news:...
> > Can you explain what you mean by "there is no value" - how are you
> > determining this? Also, what do you mean by a "field in the web

control?"
> > Define what you mean by "field" and "web control".
> >
> > --
> > HTH,
> >
> > Kevin Spencer
> > Microsoft MVP
> > .Net Developer
> > http://www.takempis.com
> > The more I learn, the less I know.
> >
> > "CJ Taylor" <> wrote in message
> > news:...
> > > Hey all,
> > >
> > > I have a ASP.NET application running on Rainbow Portal, (the forums

ahve
> > > been kinda useless).
> > >
> > > Anyways, I have a single control that for some reason whenever I hit

the
> > > calculate button in it (a simple link button) it will go to the event
> > > procedure, call the proper method and then when I try to access a

field
> in
> > > the web control it comes up with nothing. Like the field is suddenly

> > gone.
> > >
> > > For example, txt_Markup is a text field, its a server control, but

when
> I
> > > postback, there is no value. So I checked the variables posted from

the
> > > form, not there either.
> > >
> > > This is only happening in a single form... wondering if someone could

> lead
> > > me in the right direction on where to look.
> > >
> > > Thanks,
> > > CJ
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
CJ Taylor
Guest
Posts: n/a
 
      08-27-2003
Sorta...

Think about when you drop a textbox control into a web page... you create an
reference in the codebehind...

you can access the reference on postbacks/pageloads by calling it by its
referenced name and pull the value out... well, for some reason, on every
post back, whether or not htere is a value, it always comes up blank (or
String.empty thatis).


"Kevin Spencer" <> wrote in message
news:#utGQx#...
> It's still kind of hard to follow you, but it sounds like when you say you
> "drop a textbox object into the web control" you mean that you are adding

a
> textbox to the control's Controls Collection. If that's the case, you

would
> have to find the control using the parent Control's FindControl() method.
>
> --
> HTH,
>
> Kevin Spencer
> Microsoft MVP
> .Net Developer
> http://www.takempis.com
> The more I learn, the less I know.
>
> "CJ Taylor" <> wrote in message
> news:...
> > Alright I drop a textbox object into the web control. (User Web Control,
> > inherited from Rainbow.PortalModuleControl or something).
> >
> > So this should maintain viewstate. that being, if I enter a value into

> the
> > textbox control, it should maintain viewstate on a postback (given I'm

> doing
> > no databinding).
> >
> > However, when the postback event occurs, I should be able to reference

it
> > with "this.txt_Markup.text" to get the text value from the postback as I

> do
> > with all my other forms.
> >
> > Nope.
> >
> > So if I enter text in this box, and hit my link button, which fires an

> event
> > called lnk_Calculate.Click which is handled by lnk_Calculate_Click, it

> works
> > until I try to retreive that value. And with that, it comes up with
> > nothing. so if I do a response.write(this.txt_Markup.Text), it shows
> > nothing.
> >
> > Hope that helps.
> >
> > CJ
> > "Kevin Spencer" <> wrote in message
> > news:...
> > > Can you explain what you mean by "there is no value" - how are you
> > > determining this? Also, what do you mean by a "field in the web

> control?"
> > > Define what you mean by "field" and "web control".
> > >
> > > --
> > > HTH,
> > >
> > > Kevin Spencer
> > > Microsoft MVP
> > > .Net Developer
> > > http://www.takempis.com
> > > The more I learn, the less I know.
> > >
> > > "CJ Taylor" <> wrote in message
> > > news:...
> > > > Hey all,
> > > >
> > > > I have a ASP.NET application running on Rainbow Portal, (the forums

> ahve
> > > > been kinda useless).
> > > >
> > > > Anyways, I have a single control that for some reason whenever I hit

> the
> > > > calculate button in it (a simple link button) it will go to the

event
> > > > procedure, call the proper method and then when I try to access a

> field
> > in
> > > > the web control it comes up with nothing. Like the field is

suddenly
> > > gone.
> > > >
> > > > For example, txt_Markup is a text field, its a server control, but

> when
> > I
> > > > postback, there is no value. So I checked the variables posted from

> the
> > > > form, not there either.
> > > >
> > > > This is only happening in a single form... wondering if someone

could
> > lead
> > > > me in the right direction on where to look.
> > > >
> > > > Thanks,
> > > > CJ
> > > >
> > > >
> > >
> > >

> >
> >

>
>



 
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
Where is the javascript that disables postback the postback control? gnewsgroup ASP .Net 1 02-13-2008 10:45 PM
CompositeControl class failing to register postback Mantorok ASP .Net 2 06-22-2006 08:47 AM
Can I raise a postback ? Session variable only visible after postback. Please help gce ASP .Net 2 05-08-2005 05:55 AM
Postback not being set to True on first postback =?Utf-8?B?Q2hhZA==?= ASP .Net 2 04-04-2005 06:17 PM
effecting postback without auto postback controls Psych971 ASP .Net 5 12-17-2004 08:53 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