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

Postback failing in 1 control

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
Nov 17 '05 #1
4 1416
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" <ct*****@mortonwelding.com> wrote in message
news:u7**************@TK2MSFTNGP09.phx.gbl...
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

Nov 17 '05 #2
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" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:On*************@TK2MSFTNGP10.phx.gbl...
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" <ct*****@mortonwelding.com> wrote in message
news:u7**************@TK2MSFTNGP09.phx.gbl...
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


Nov 17 '05 #3
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" <ct*****@mortonwelding.com> wrote in message
news:u0**************@tk2msftngp13.phx.gbl...
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" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:On*************@TK2MSFTNGP10.phx.gbl...
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" <ct*****@mortonwelding.com> wrote in message
news:u7**************@TK2MSFTNGP09.phx.gbl...
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



Nov 17 '05 #4
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" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:#u**************@tk2msftngp13.phx.gbl...
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" <ct*****@mortonwelding.com> wrote in message
news:u0**************@tk2msftngp13.phx.gbl...
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" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:On*************@TK2MSFTNGP10.phx.gbl...
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" <ct*****@mortonwelding.com> wrote in message
news:u7**************@TK2MSFTNGP09.phx.gbl...
> 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
>
>



Nov 17 '05 #5

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

Similar topics

6
by: V | last post by:
I have found that when I have a composite control that uses the CreateChildControls method, on a regular page load, Page_Load executes before CreateChildControls, but on a postback it is the...
0
by: CJ Taylor | last post by:
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...
5
by: Dan | last post by:
Hi, I'd like to find out the control that caused a postback to be raised. Obviously this could simply done in a control event handler. I am not going to do this method and would like no...
5
by: Matthew Louden | last post by:
I created simple ASP.NET web application to test how AutoPostBack property in a web control works. I set AutoPostBack property to be true of a web control. When I run the application, here's the...
10
by: Krista Lemieux | last post by:
I'm new to ASP.NET and I'm not use to the way things are handled with this technology. I've been told that when I have a control, I should only bind the data to it once, and not on each post back...
2
by: RAJ | last post by:
In our multi-tier application, we have several ASP.NET user controls which will update the same data source provided by middle tier logic. In this particular scenario we have one user control...
1
by: Timbo | last post by:
Hi all, This is my first message here so i'll try and include all the information that will help you help me out, if possible. Basically I am using C# in ASP.NET 2.0 and have a Repeater...
0
by: Kevin Blount | last post by:
I'm trying to create a mutli-form page on my website, but having trouble with the PostBack stuff. And yes, I'm new to C# - my background of 8yrs is original ASP, and I'm getting easily confused...
3
by: vinay | last post by:
Hi All I have a page in which i using user control .on user control i using javascript to pop up a message .when i choose wrong date in user control & submits the page it alerts the message of...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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
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
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.