I wnat to check "UserName" input with for the following conditions using C#,
must Srating with alpha numeric characterlength is 6 to 15 charsdo not use more than 5 numeric charactersdo not use any special characters
View Complete Post
The below code is not working when validating a unique username but the required rule works.
Here is the error:
Web page error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB6.6; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; .NET4.0E)
Timestamp: Tue, 2 Nov 2010 20:12:57 UTC
Message: Expected '}'
I have reset the users profiles and even had the user use a different computer. here is what I think the deal is. Her last name is "O'Tool", and when the list is generating the calendar view it is freaking out... could it be the "'" in her name?
I have tried to go to the back end database and remove her, or at lease change the name.. but can't find the information.
the page works great for anyone else, even on the same computer?
Im running a query where it selects a property from the user with the matching username but i dont know how to find out the username of the currently loggedin user.
Not sure which category to put this question in, so I will put it in here.
Just to give you an idea of the layout of my solution, I have the main project, along with 2 class libraries, BLL and DAL. (Business Logic Layer and Data Access Layer)
The BLL refers to the DAL and the main project refers to the BLL.
I had a test website and the code worked fine, but the same code will not work on the real project. The only difference is that in the test project, the code was on an aspx code behind, whereas in the real project, it is an ascx code behind (Web User Control )
The code is:
Dim connectionString As String = ConfigurationManager.ConnectionStrings("ASPNETDBConnectionString").ConnectionString
Dim recordEntry As New UserRecord(connectionString)
recordEntry.UserName = "TestName"
recordEntry.BMI = bMI
recordEntry.BMR = bMR
recordEntry.FTM = fTM
recordEntry.TDEE = tDEE
recordEntry.TodayDate = dateForToday
I've tried this method in my code behind to try and validate that the Fileupload control has a file or not. I get the error message the the event "Server Validate" cannot be found. Can anyone tell why? Thanks.
Public Sub CustomValidator1_ServerValidate(ByVal source As Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs) Handles CustomValidator1.ServerValidate
' Get file name Dim uploadAvatar As FileUpload = DirectCast(AdvertisementForm.FindControl("uploadAvatar"), FileUpload) Dim UploadFileName As String = uploadAvatar.PostedFile.FileName If UploadFileName = "" Then ' There is no file selected args.IsValid = False Else Dim Extension As String = UploadFileName.Substring(UploadFileName.L