473,386 Members | 1,873 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.

server side control and undefined value

Hi,
I noticed this behaviour more often.
in the visual c# editor of .NET 1.1 if select a HTML control and then select
it in the form editor and then right click and select run as server control,
thhus changing it to a server side control, sometimes these controls don't
get initialised in the code behind.
For instance, now I have a radio group of 5 radio button, and I selected
them an made them run at server. If i put a breakpoint in my code behind in
the page_load on these lines of code
if(Request["rdoAbonnement"]!=null){
if(Request.Form["rdoAbonnement"].Equals(Radio1.Value)){do something}
if(Request.Form["rdoAbonnement"].Equals(Radio2.Value)){do something}
if(Request.Form["rdoAbonnement"].Equals(Radio3.Value)){do something}
if(Request.Form["rdoAbonnement"].Equals(Radio4.Value)){do something}
if(Request.Form["rdoAbonnement"].Equals(Radio5.Value)){do something}
}
However Radio3 is a null reference, this control reference doesn;'t get
initialises. I saw this behaviour more often and with different types of
controls.
Anybody got an idea?
Greetz Boris
Nov 16 '05 #1
2 1640
This is VC++ groups. check ...csharp, aspnet

"Boris Nieuwenhuis" <bo**************@hotmail.com> wrote in message
news:ea**************@TK2MSFTNGP12.phx.gbl...
Hi,
I noticed this behaviour more often.
in the visual c# editor of .NET 1.1 if select a HTML control and then select it in the form editor and then right click and select run as server control, thhus changing it to a server side control, sometimes these controls don't
get initialised in the code behind.
For instance, now I have a radio group of 5 radio button, and I selected
them an made them run at server. If i put a breakpoint in my code behind in the page_load on these lines of code
if(Request["rdoAbonnement"]!=null){
if(Request.Form["rdoAbonnement"].Equals(Radio1.Value)){do something}
if(Request.Form["rdoAbonnement"].Equals(Radio2.Value)){do something}
if(Request.Form["rdoAbonnement"].Equals(Radio3.Value)){do something}
if(Request.Form["rdoAbonnement"].Equals(Radio4.Value)){do something}
if(Request.Form["rdoAbonnement"].Equals(Radio5.Value)){do something}
}
However Radio3 is a null reference, this control reference doesn;'t get
initialises. I saw this behaviour more often and with different types of
controls.
Anybody got an idea?
Greetz Boris

Nov 16 '05 #2
Sorry

"Pent" <pent> wrote in message news:eq**************@TK2MSFTNGP09.phx.gbl...
This is VC++ groups. check ...csharp, aspnet

"Boris Nieuwenhuis" <bo**************@hotmail.com> wrote in message
news:ea**************@TK2MSFTNGP12.phx.gbl...
Hi,
I noticed this behaviour more often.
in the visual c# editor of .NET 1.1 if select a HTML control and then

select
it in the form editor and then right click and select run as server

control,
thhus changing it to a server side control, sometimes these controls don't get initialised in the code behind.
For instance, now I have a radio group of 5 radio button, and I selected
them an made them run at server. If i put a breakpoint in my code behind

in
the page_load on these lines of code
if(Request["rdoAbonnement"]!=null){
if(Request.Form["rdoAbonnement"].Equals(Radio1.Value)){do something}
if(Request.Form["rdoAbonnement"].Equals(Radio2.Value)){do something}
if(Request.Form["rdoAbonnement"].Equals(Radio3.Value)){do something}
if(Request.Form["rdoAbonnement"].Equals(Radio4.Value)){do something}
if(Request.Form["rdoAbonnement"].Equals(Radio5.Value)){do something}
}
However Radio3 is a null reference, this control reference doesn;'t get
initialises. I saw this behaviour more often and with different types of
controls.
Anybody got an idea?
Greetz Boris


Nov 16 '05 #3

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

Similar topics

1
by: Cathryn Lindner | last post by:
I have a web form that has a checkbox on it and a textbox associated with it. I want the textbox to be displayed when the checkbox is checked and I want this to happen on the client-side instead of...
12
by: HarveyB | last post by:
I would like to generate non-modal popup windows from ASP.Net code-behind. I have tried using Client Side scripting like "function Test(){ window.open('test.htm',_blank,...
2
by: Hazzard | last post by:
I just realized that the code I inherited is using all asp.net server controls (ie. webform controls) and when I try to update textboxes on the client side, I lose the new value of the textbox when...
3
by: Reetu | last post by:
Hi All, I have an html button on .aspx page. <INPUT class="sbttn" id="btnComplete0" onclick="onComplete ()" type="button" value="Mark Completed" name="btnComplete0"> When the user clicks...
8
by: Mike Fellows | last post by:
Ok, im not sure if this is at all possible and if it is how i go about it is beyond me i have a piece of client side code that requires a piece of data from the server side (an ID number in this...
2
by: Francois | last post by:
Hi, I have a form which contains some non server side controls. I have seen in the generated HTML of a page that non server side controls can be read by the server code (C# or VB.NET) as the...
22
by: Mr Newbie | last post by:
I was thinking about developing a workflow application yesterday and was musing over the different approaches than one could take in restricting specific actions on a ticket( Form ) at any said...
5
by: Ben Dewey | last post by:
This is a repost, But I have some new information. I have a server that is configured for .NET 1.1 and 2.0. For some reason all my postback events for aren't firing when using .NET 1.1. Under...
2
by: dustbort | last post by:
I recently had a problem where my required field validator stopped working. But, the page still posted back and tried to insert a record into the database without performing server-side validation....
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:
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.