Can anybody help me out with this exception. I have tried couple of fixes but nothing worked. I am getting this exception only in IE(7, 8 and 9).
When i load the pa
In my case, the problem was having two tags.
I have a TextBox in my main page. If the user enters a value in this TextBox, a Script goes to another page and searches that value while user continues to write it. Normally I created this "another" page by clicking Website
, Add New Item
. So Visual Studio created a new page for me. As usual there was tag in this new page, too. So I deleted this tags and the problem was solved.
Below are my codes:
(PS: I use MasterPage. But the below code is only needed in my main page)
Dim scriptText As String
scriptText = ""
scriptText += "function serinogoster(str) {" + Chr(10)
scriptText += "var xhttp;" + Chr(10)
scriptText += "if (str == '') {" + Chr(10)
scriptText += "document.getElementById('ctl00_ContentPlaceHolder1_Label19').innerHTML = '';" + Chr(10)
scriptText += "return;" + Chr(10)
scriptText += "}" + Chr(10)
scriptText += "xhttp = new XMLHttpRequest();" + Chr(10)
scriptText += "xhttp.onreadystatechange = function() {" + Chr(10)
scriptText += "if (this.readyState == 4 && this.status == 200) {" + Chr(10)
scriptText += "document.getElementById('ctl00_ContentPlaceHolder1_Label19').innerHTML = this.responseText;" + Chr(10)
scriptText += "}" + Chr(10)
scriptText += "};" + Chr(10)
scriptText += "xhttp.open('GET', 'serinover.aspx?serino='+str, true);" + Chr(10)
scriptText += "xhttp.send();" + Chr(10)
scriptText += "}" + Chr(10)
Me.ClientScript.RegisterClientScriptBlock(Me.GetType(), "OnKeyUpScript", scriptText, True)
TextBox6.Attributes.Add("onkeyup", "serinogoster(this.value);")
In the above code serinover.aspx
is the second page which should not have tag.