473,387 Members | 1,650 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,387 software developers and data experts.

Button not firing - and strange message

Hi - I have a really strange problem - straight forward login code (on
the event of a button press).

Works perfectly locally - but when I upload to my host, I get the
message and stack shown below.

If I take out the 'Handles btnLogin.Click' - then it doesn't fire the
btnClick routine - BUT - the page will display on my host (albeit it
won't do anything when I press the button)? I'd really appreciate some
help with this.

(in my login.aspx.vb page):

Private Sub btnLogin_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnLogin.Click
If checkUserExists(tbAccess_Name.Text, tbAccess_Password.Text)
Then
Response.Redirect("admin.aspx")
Else
lbMessage.Text = "Username or password not found - please
try again"
End If
End Sub

Error message on host if I leave in 'Handles btnLogin.Click':

Length cannot be less than zero. Parameter name: length
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.ArgumentOutOfRangeException: Length cannot be
less than zero. Parameter name: length

Source Error:

An unhandled exception was generated during the execution of the current
web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.

Stack Trace:
[ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length]
System.String.Substring(Int32 startIndex, Int32 length) +172
System.Web.UI.Util.GetScriptLocation(HttpContext context) +202

System.Web.UI.WebControls.BaseValidator.RegisterVa lidatorCommonScript()
+69
System.Web.UI.WebControls.BaseValidator.OnPreRende r(EventArgs e) +44
System.Web.UI.Control.PreRenderRecursiveInternal() +62
System.Web.UI.Control.PreRenderRecursiveInternal() +125
System.Web.UI.Control.PreRenderRecursiveInternal() +125
System.Web.UI.Page.ProcessRequestMain() +1489

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #1
0 1024

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mark | last post by:
Hi - I have a really strange problem - straight forward login code (on the event of a button press). Works perfectly locally - but when I upload to my host, I get the message and stack shown...
1
by: Bin Song, MCP | last post by:
Hi all I got a strange problem In my webform, I have a server-side Button "btnDisable" to save some data and enable or disable all other fields in this form based on the data. The logic is: on...
2
by: ~~~ .NET Ed ~~~ | last post by:
I have a problem (don't we all?). I have a web form with multiple modules, some of these modules have an ASP.NET (server run) button. OK, now I have UserControlX which has one such button (say...
5
by: csgraham74 | last post by:
Hi guys, I posted regarding this issue the other day but i still dont have an answer to my problem. Basically i have imported asp.net pages from dreamweaver into visual studio. Ive added a...
3
by: Aahz | last post by:
I have big asp.net , c# project with many buttons and image buttons that suddenly stop firing, when you click on button form -nothins happen. What strange that in Firefox they are still work...
19
by: furiousmojo | last post by:
This is a strange problem. I have a project where the contents of global.asax application_error are not firing. It is an asp.net 2.0 application using web application projects. I have another...
8
by: SAL | last post by:
Hello, I have a button on a webform that has an OnClick event defined as such: <asp:Button ID="btnSearchByName" runat="server" Text="Search By Name" OnClick="btnSearchByName_Click" Width="152px"...
3
by: Jay | last post by:
I am on the 2.0 framework and have run the c:\windows\microsoft.net \framework\v1.1.4322\aspnet_regiis.exe -c and had no success. About half of the buttons on my webforms are firing and the other...
5
by: Tony | last post by:
I am continuing to develop an Access 2007 application which was originally converted from Access 2003. In Access 2003 I was able to disable the Access Close button in the top righthand corner of...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.