Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 16th, 2004, 02:27 PM
Registered User
 
Join Date: Jul 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Visual Studio ASP.NET HELLLPPP!!!

Ok, so I am just learning how to use ASP.Net for an internship and my mentor/boss is away on business, so I am stumped!!!

I have this in EditQuestions.aspx.vb:

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'Put user code to initialize the page here
        Dim record_ID As String

        record_ID = Request.QueryString(record_ID)
End Sub

Which is called from ProcessPage.aspx (HTML side):
function EditQuestions(record_ID)
{
//s_xml = "<pagedata>"
// s_xml = s_xml + "<row>"
// s_xml = s_xml + "<record_ID>" + record_ID + "</record_ID>"
// s_xml = s_xml + "</row>"
//s_xml = s_xml + "</pagedata>"
       var myObject = new Object();
       var retVal = new Object();
    myObject.record_ID = record_ID;

    URL = "http://www.tycosolutions.com/EditQuestions.aspx" + "?record_ID="+record_ID

    //window.alert(myObject.record_ID);
retVal = showModalDialog(URL,myObject.record_ID,"dialogWidt h:750px;dialogHeight:550px;status:0");

    }

We have a database set up where record_ID is pulled from it (and that part does work) that is being passed to EditQuestions so a user can edit the question at that ID. But when the processPage loads and the user clicks on the button I get this error message:

Object reference not set to an instance of an object.
It says in the stack the error is coming from Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Some please help me out. Thanks!!

Reply With Quote
  #2 (permalink)  
Old July 16th, 2004, 03:10 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

I think you forgot quotes around record_id in the QueryString:

Dim record_ID As String

record_ID = Request.QueryString("record_ID")

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
  #3 (permalink)  
Old July 17th, 2004, 12:23 AM
Friend of Wrox
Points: 3,558, Level: 25
Points: 3,558, Level: 25 Points: 3,558, Level: 25 Points: 3,558, Level: 25
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: California, USA
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

Something I saw added in ASP.NET from ASP was GET in QueryString. I mean like
Code:
Request.QueryString.Get("record_ID")
Always:),
Hovik Melkomian.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to create ASP page in visual studio.net madhusrp Other Programming Languages 3 March 2nd, 2006 03:07 AM
CLassic ASP in Visual Studio.NET rodmcleay ASP.NET 1.0 and 1.1 Professional 2 September 6th, 2004 08:06 PM
Creating ASP.NET Application in Visual Studio.NET Maxood ASP.NET 1.0 and 1.1 Basics 1 March 8th, 2004 01:56 PM
HELP! Visual Studio locks assemblies for ASP.NET p bobmwaldo Pro VB.NET 2002/2003 1 November 21st, 2003 02:19 PM
HELP! Visual Studio locks assemblies for ASP.NET p bobmwaldo VB.NET 0 November 21st, 2003 11:44 AM



All times are GMT -4. The time now is 03:41 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.