Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 16th, 2004, 02:27 PM
Registered User
 
Join Date: Jul 2004
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!!

 
Old July 16th, 2004, 03:10 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 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.
 
Old July 17th, 2004, 12:23 AM
Friend of Wrox
 
Join Date: Jun 2003
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.





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





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