vb.net - how to create session in asp.net using vb -
vb.net - how to create session in asp.net using vb -
i have gridview shows details of passenger have booked ticket on page load event have next code.
label1.text = session("pid").tostring() dim sql string = "select * plist pid='" & label1.text & "'" seek con.connectionstring = strcon dim cm new sqlclient.sqlcommand(sql, con) con.open() cm.executenonquery() grab ex exception msgbox(ex.message) if con.state = connectionstate.open con.close() end if end seek
i getting error: system.nullreferenceexception: object reference not set instance of object.
the session session("pid")
null, should fill info before , should check session:
if session("pid") isnot nil ' write code end if
asp.net vb.net
Comments
Post a Comment