Object reference not set to an instance of an object

G

Guest

I don't have code for that yet. It is a question of concept. Is there a
control to verify that if one check box is not checked, then the other is?

As far as I remember you have to do a custom validator for checkbox.
But... why don't you like your own code?

If Checkemp.Checked AndAlso Checknon.checked Then
Empornon = "both"
ElseIf Checkemp.Checked Then
Empornon = "Employee"
ElseIf Checknon.checked Then
empornon= "Non-Employee"
Else Empornon = ""
End If

This gives you a value of Empornon (both, Employee, Non-Employee or
empty string). As I understand, you need to show an error when
Empornon is empty, right?

So, simply add

If Empornon = "" Then
Response.Write("ERROR: please define your status")
Exit Sub
End If
 
G

Guest

dancer said:
Sorry to be so dumb, but how do I get to web.config file on my server?

You should have a local copy of it, make a change and copy back (e.g. via
FTP)
 
D

dancer

I am communicating with my server by FrontPage, not ftp.
I called my server and asked, "How do I get to the web.config file?"
He answered, "What's that?"
 
D

dancer

WHAT A HELP YOU ARE ALEXEY!!!
Could you also tell me how to make the Response.Write write in red?
The validator response text is all in red, but I didn't tell it to be in
red. Is this a default for all validator text, or am I missing something?
 
G

Guest

WHAT A HELP YOU ARE ALEXEY!!!
Could you also tell me how to make the Response.Write write in red?
The validator response text is all in red, but I didn't tell it to be in
red. Is this a default for all validator text, or am I missing something?

You are missing a HTML telling that the text must be in red :)

Response.Write("<font color=""red"">This message is in red.</font>")
 
G

Guest

I am communicating with my server by FrontPage, not ftp.
I called my server and asked, "How do I get to the web.config file?"
He answered, "What's that?"

Huh, a FrontPage? I'm not sure how it is working there, but as far as
I remember it has a site browser with all the files, I'm right? The
main web.config file is located in the root directory of your web
site. A web.config file could be located also in a sub-directories of
an application, but I think you don't use such case. So, look in the
root. If you have one, open it in FrontPage or copy a new one from
your local box.

How To Create the Web.config File for an ASP.NET Application
http://support.microsoft.com/kb/815179
 
D

dancer

Hi Alexey,
There was not a web.config file on my web at the server. They created one.
Now I get errors which are no problem on my own computer.
I notice that at the end of the errors page is this:

Version Information: Microsoft .NET Framework Version:1.1.4322.2379; ASP.NET
Version:1.1.4322.2379

While on MY computer there is this:

Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET
Version:2.0.50727.210

Would that have anything to do with it?
If so, what can I do?
 
J

Juan T. Llibre

That error message means that, at the server, the application is running
against the .Net Framework 1.1, while at your computer it's running
against the .Net Framework 2.0.

You will need to set the application to run against
the .Net Framework 1.1 and your problems will go away.

Open the IIS Manager, right click the application, and select the "ASP.NET" tab;
then, select the .Net Framework 1.1 from the dropdown and OK your way out.

Stop and restart IIS ( from a "Run", cmd ) : iisreset

....and everything should work fine.
 
J

Juan T. Llibre

re:
!> You will need to set the application to run against
!> the .Net Framework 1.1 and your problems will go away.

Oops... that's backwards.

You will need to set the application, at the server, to run against
the .Net Framework 2.0 and your problems will go away.

Open the server's IIS Manager, right click the application, and select the "ASP.NET" tab;
then, select the .Net Framework 2.0 from the dropdown and OK your way out.

Stop and restart the server's IIS ( from a "Run", cmd ) : iisreset

...and everything should work fine.

Sorry about the instruction reversal.
 
D

dancer

Here is an error that comes up on the server. But this line compiles fine
on my computer
Compilation Error
Description: An error occurred during the compilation of a resource required
to service this request. Please review the following specific error details
and modify your source code appropriately.

Compiler Error Message: BC30456: 'Text' is not a member of
'System.Web.UI.WebControls.CheckBoxList'.

Source Error:


Line 28: Dim TheNature As String = nature.Text
Line 29: Dim TheNatureNew As String
Line 30: Dim TheIndicate As String = Indicate.Text
Line 31: Dim TheAction As String = action.Text
Line 32: Dim TheActionNew As String

Source File: e:\accounts\whee13\WWW\juan_radio32.aspx Line: 30



Show Detailed Compiler Output:

c:\windows\system32\inetsrv>
"c:\windows\microsoft.net\framework\v1.1.4322\vbc.exe" /t:library
/utf8output
/R:"c:\windows\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d50a3a\system.enterpriseservices.dll"
/R:"c:\windows\assembly\gac\system.data\1.0.5000.0__b77a5c561934e089\system.data.dll"
/R:"c:\windows\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system.drawing.dll"
/R:"c:\windows\assembly\gac\system.web.mobile\1.0.5000.0__b03f5f7f11d50a3a\system.web.mobile.dll"
/R:"c:\windows\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.dll"
/R:"c:\windows\assembly\gac\system.web.services\1.0.5000.0__b03f5f7f11d50a3a\system.web.services.dll"
/R:"c:\windows\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll"
/R:"c:\windows\assembly\gac\system.web\1.0.5000.0__b03f5f7f11d50a3a\system.web.dll"
/out:"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
Files\root\abc4b73d\d202bb95\r8nbr8x9.dll" /debug-
/win32resource:"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary
ASP.NET Files\root\abc4b73d\d202bb95\r8nbr8x9.res"
"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
Files\root\abc4b73d\d202bb95\r8nbr8x9.0.vb"


Microsoft (R) Visual Basic .NET Compiler version 7.10.7017.4
for Microsoft (R) .NET Framework version 1.1.4322.2379
Copyright (C) Microsoft Corporation 1987-2002. All rights reserved.

e:\accounts\whee13\WWW\juan_radio32.aspx(30) : error BC30456: 'Text' is not
a member of 'System.Web.UI.WebControls.CheckBoxList'.

Dim TheIndicate As String = Indicate.Text
~~~~~~~~~~~~~



Also this was one of many lines under "complete compilation source"
Line 268: Protected Indicate As
System.Web.UI.WebControls.CheckBoxList

Thanks!
 
G

Guest

Here is an error that comes up on the server. But this line compiles fine
on my computer
Compilation Error
Description: An error occurred during the compilation of a resource required
to service this request. Please review the following specific error details
and modify your source code appropriately.

Compiler Error Message: BC30456: 'Text' is not a member of
'System.Web.UI.WebControls.CheckBoxList'.

CheckBox Control has no Text property in .NET 1.0-1.1
http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.checkboxlist_members(vs.71).aspx
 
D

dancer

I am so irritated! My server - which is BellSouth.net - which is now AT&T -
does not have .Net Framework 2.0 installed.
Are they not WAY behind??!!

If I go backward, will much of my code have to be re-written?

Thank you.
 
G

Guest

I am so irritated! My server - which is BellSouth.net - which is now AT&T -
does not have .Net Framework 2.0 installed.
Are they not WAY behind??!!

maybe it simply not yet configured for your web site?
 
J

Juan T. Llibre

re:
!> If I go backward, will much of my code have to be re-written?

Any code which runs against 2.0-specific objects will fail.

Do *you* have the .Net Framework 1.1 installed ?

If you do, the best way to know whether your code will run is to install
the Web Matrix ( http://www.asp.net/webmatrix/ ) which has a
development web server, just like Visual Studio and VWD have.

It's only a 1.3MB download.

If the code runs within the Web Matrix development server, you're good to go.

If not, you can make the needed changes right in the
Web Matrix IDE, so your code *will* run against ASP.NET 1.1.

Of course, you can also ask your AT&T ISP whether they can support ASP.NET 2.0.
I'd find it really odd if they did not support ASP.NET 2.0.
 
D

dancer

This is what they say.
Unfortunately we are unable to fulfill this request. We do upgrade our
software as soon as possible, however, it does require that we go through a
rigorous certification process first, to make sure that the new software
does not conflict with any of the other software we have running, or our
site management software. As soon as we are able to certify the newest
version of the .NET framework, we will be upgrading the software on the
servers to fully support it.

And this:

Dear Valued Customer:

Currently our admins do not ahave a time table on when testing for upgrading
to the new .NET Framework will be started.
 
D

dancer

They support Asp.net 1.1 only. I already know my code fails on the server.
There don't seem to be any tutorials on 1.1, only 2.0
Does the Web Matrix tell you HOW to make the changes?
 
D

dancer

After having the webmatrix page check to see if I had the proper Net
Framework installed, I installed Web Matrix Project. I read on the "getting
started" page of the Walk Through ".NET Framework Version 1.0.3705.0"

But when I made my first little page and ran it, I got an error and this
version at the bottom:

Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET
Version:2.0.50727.210

I was very careful to choose "Use ASP.NET Web Matrix Server" when I told it
to run.

I thought Net Framework 1.1 had been installed before on my computer. But I
could not find it in the Administrative Tools - only 2.0.
So I downloaded it and answered Yes to install.
It still is not in the Administrative Tools.
I did a search and there is a Net Framework 1.1 config and 1.1 wizard in the
Administrator\Corp\Start Menu\Programs\ Administrative Tools only.

Where would it be and how do I get it to where I need it?
 
J

Juan T. Llibre

re:
!> I did a search and there is a Net Framework 1.1 config and 1.1 wizard in the
!> Administrator\Corp\Start Menu\Programs\ Administrative Tools only.

You have it installed, then.
You don't need to run those, except for very special needs.

After installing the .Net Framework 1.1, the Web Matrix's
dev server should be able to run your 1.1 pages.

You don't have to change the .Net Framework version for the app to 1.1
if you're going to use the development server built into the Web Matrix but,
to be on the safe side with IIS, switch the .Net Framework version for your app to 1.1.

Right-click the app in the IIS Manager, select "Properties" and then
select the "ASP.NET" tab; then switch the version from the dropdown.

That way, you can double-check the code in IIS, too.

As far as Web Matrix goes, just copy/paste your current app's
pages into the Web Matrix IDE, one by one, and run them.

If there's anything specific to the .Net Framework 2.0,
it will throw an error and you can change the code or the object.
 
D

dancer

I have downloaded and installed Net Framework 1.1 yet again.
I removed Web Matrix from my computer, downloaded it again and installed it
again.
When I open the program, the first page, as it is opening, says Net
Framework 2.
When I run a little program with an error in it, the compiler says
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET
Version:2.0.50727.210
?????
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top