473,395 Members | 1,504 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

PageRequestManagerParserErrorException

44
Hi

I have created the login form with the following coding

Protected Sub imgLogin_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles imgLogin.Click

Dim con As SqlConnection
Dim cmd As New SqlCommand
Dim str As String
Dim rd As SqlDataReader
str = "user id=sa;password=cast;database=jsc;server=AURORA-SERVER"
con = New SqlConnection(str)
Try
con.Open()
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "Pro_Login1"
cmd.Connection = con

Dim loginid As New SqlParameter("@loginid", SqlDbType.VarChar, 50)
loginid.Value = txtLoginId.Text.ToString()

Dim password As New SqlParameter("@password", SqlDbType.VarChar, 50)
password.Value = txtPassword.Text.ToString()

cmd.Parameters.Add(loginid)
cmd.Parameters.Add(password)
Dim cnt As Int16
cnt = cmd.ExecuteNonQuery()

cnt = cmd.ExecuteScalar()
If cnt <= 0 Then
Response.Write("The login or password you entered does not match our records. Please check your entry and try again.")
Else
'Response.Write("Authorise user")
Response.Redirect("Default3.aspx")
End If
Catch ex As Exception
End Try
End Sub


In this to control the page load, I have kept the "txtPassword"- TextBox in Update panel and added the trigger property of the update panel as "imgLogin"-button.

The issue is, while I am running, if I give the invalid login id or password, The Response.write is not getting displayed instead it is showing the error as


Sys.WebForms.PageRequestManagerParserError Exception: The message received from the server could not be parsed. Common Causes for this error are when the response is modified by calls to Response.Write(), response filters, Http Modules, or Server trace is enabled.

Details: Error Pursing near "The login or Password".
May 16 '08 #1
1 1707
kenobewan
4,871 Expert 4TB
Try taking the if cnt <= 0 out of try catch and closing your connection. Report back what happens. Thanks.
May 18 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: jobs | last post by:
I've got a masterpage with a custom control that has a calendar. when dates on the calendar are selected, it sets a session variable. that calender is on every page via the master page. In the home...
0
by: SMichal | last post by:
Hi, I have a simple web with simple apsx page which displays list of persons (PersonList.aspx)...as you can see in this picture (follow that link to imageshack please)...I'm using only update panel...
1
by: Jones | last post by:
Hello, I have an ajax enabled application with a master page and am also using ajax extensions update panel. On my page I've got a grid view that's connected to an objectdatasource which is...
1
by: Temesgen Meheret | last post by:
I am wrapping a grid view in an update panel, and I am not doing anything with Response.Write or Server.Transfer. But for any click inside that grid we get ...
0
by: rote | last post by:
I'm trying to use jan's wonderful SmartPart from http://weblogs.asp.net/jan/archive/2007/02.aspx After trying the Connections Demo from the site and making a connectable webpart When using the...
4
by: saint999 | last post by:
Desperately need help. We are using a .Net AJAX control panel and having an issue with when a user times out of our Authenication platform. If a user stays on the screen with no activity for 15mins...
1
by: steve waugh | last post by:
Hi All I m using Ajax in my application and i m getting the error Sys.WebForms.PageRequestManagerParserErrorException when i use "Respone.Write" Please provide the solution for the...
8
by: Ben | last post by:
Hi, i'm trying to build a simple site navigation (using c#)... i implemented a master page that shows a sidebar user control on the left side, and a content page on the right. i click the...
0
by: Venkat | last post by:
Hello, any one faced the exception "sys.webforms.pagerequestmanagerparsererrorexception" while using Ajax page? Regards, Venkat
1
by: =?Utf-8?B?SFJzb2Z0IEluZm9ybcOhdGljYQ==?= | last post by:
Windows 2003 webedition - asp.net 3.5 Dear friends I installed my apps on IIS 6 on 2k3 WE, configured with ASP.NET 3.5 My app has Ajax with Ajax ToolKit when running the application on the...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.