p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   ADO.NET (http://p2p.wrox.com/forumdisplay.php?f=109)
-   -   Visual Studio ASP.NET HELLLPPP!!! (http://p2p.wrox.com/showthread.php?t=15542)

Kimmer527 July 16th, 2004 02:27 PM

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!![8D]


Imar July 16th, 2004 03:10 PM

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.

melvik July 17th, 2004 12:23 AM

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.


All times are GMT -4. The time now is 09:00 PM.

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