Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

Object reference not set to an instance of an object

$
0
0

I have a form with 2 text boxes which I am adding text to. The code for these is:

Protected

Sub btnContinue_Click(sender AsObject, e AsEventArgs)HandlesbtnContinue.Click

Response.Redirect("DisplayByKeyword.aspx?kw1="& txtKey1.Text & "&kw2="& txtKeyword2.Text & "&oper="& selAndOr.Value & "")

EndSub

This leads to another form called DisplayByKeyword which contains the following code:

strKeyword = Request.QueryString("kw1").Trim()

strKeyword2 = Request.QueryString("kw2").Trim()

kwOperator = Request.QueryString("oper").Trim()

I keep getting the error message "Object reference not set to an instance of an object" for all three of the above even though they all contain text and should eb picking it up from the QueryString.

Anyone any ideas ?


Viewing all articles
Browse latest Browse all 23244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>