Writing A Function To Validate That A User Has Entered Their Full Name?
Jun 13, 2011writing a function to validate that a user has entered their full name (so at least two names must exist in the textbox).
View 2 Replieswriting a function to validate that a user has entered their full name (so at least two names must exist in the textbox).
View 2 RepliesI'm trying to figure out a way to validate the user data entered:
[Code]...
This is in MVC3, VB.net. I'm looking for an easy way to validate a users input data into the editorfor field.
I am trying to get my program to validate the hexadecimal range entered by the user, the range being between 00 - FF,
View 17 RepliesIs it possible to validate the value entered within a textbox by comparing it with a text file that is full off accepted values?
in my textbox will be a location like London, i want to be able to validate that it is correct by looking in my text file to see if it is there?
my textfile would be written like this:
|london|manchester|birmingham|leeds|bristol| ... etc so it need to split the values by looknig with the pipe characters ( | )?
how to validate 4 textboxes so that only numbers 1 to 4 can be entered but no number can be repeated.i already have code but it only validates some of the boxes and allows numbers to be repeated in other
Public Class frmGrid
Private Grid() As Short
Private Const intDimension As Short = 3
[Code]....
is there a flag i can call to validate the text entered in to a databound combobox?
My situation is that i have a combobox where users can type in whatever they like, but OnLeave i'd like to ensure the value in the combobox is one of the items in the data that its bound to.
i'm avoiding a listbox because the suggest/append creates a nicer interface while they are typing as it shows possible matches.
I have designed a form with textboxes for numerical entry. I need to validate each textbox so the number entered is an integer, and is between 0-1000. I am struggling to find how to validate the data entry.
View 4 RepliesCan i use the timer when the user tries to log-in and the user entered a wrong password 3 times.i will give the user 5 mins to log-in again with the correct password and if the user enters the wrong pass. 3 times again i will give another 10mins also this is what i want when the user close the program the timer is also their and running that it will give the user the remaining tym on how much tym left 4 him to log-in again.Can i do this in vb.net??i dont know how 2 do this i dont have a clue if it is possible can someone give me a code??
View 9 RepliesActually I am trying to get a function to validate all the textboxes in my form. At the moment, my code look like:
Private Sub Textbox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Textbox1.textchanged
If Textbox1.Text.Length = 0 Then
MsgBox("TextBox1 is empty. Please enter something", msgboxstyle.okonly)
Textbox1.Focus()
Endif
End Sub
I have to write the same line of code for each textbox to check if it is not empty and was thinking of using a function that will be called and check each textbox in my form.
writing user info such as user, computer name, date, and time to an acces database using a button click event. Then use a query to check if the user has accepted the aggreement. If the user has accepted the aggreement then call a vb.exe that display the aggrement. I have a login script that runs the vb.exe and uses a button click that records the user info to a csv file, but if the user has already agreed to the policies I do not want it run again.
View 4 RepliesThe code below allows me to enter an integer in to the text boxes, but if I enter a decimal in any it throws an error. How do I validate decimal values in addition to integers?
Private Function numeric() As Boolean
'validate text boxes as numeric
Dim blnnumeric As Boolean = False
[Code]....
-edit- nevermind i was lucky and didnt need to change much and have this test working.I am doing a quick test and i need to choose the full path to a function.in C# i can write namespace ABC { class DEF { static string Test() { return "A test"; } } } and can access it with ABC.DEF.Test() i tried
Namespace ABC
Partial Public Class DEF
Public Function Test(ByVal v As String) As String
[code]....
and i got VBTest.ABC.DEF.Test(). How do i get rid of VBTest which is the name of my project?
is there any function to validate if a string has only numerical characters? I can cross character for character and verify if it is a number. But I look for something simpler or if already a function like that exists.
I cannot use IsNumeric or IsDigit because it returns numbers to True with point or comma.
I need only numeric characters (no comma nor points
I would like to kindly ask if there is a dictionary in vb.net?
I would like to validate some data from the user and their corresponding value.
e.g.
2 = ABC
6 = MNO
6 = MNO
7 = PQRS
8 = TUV
8 = TUV
3 = DEF
if the user had input the numeric data on textbox1, then the alpha phrase will show on textbox2.
What i want to run is that if i press the "execute" button, it will look for a word than can be create using these letters ( e.g COMPUTE )
Then it will display the word "COMPUTE" on textbox3.
Is there a function or method i could use to do that?
Simple code! where am I going wrong. I get end of statement expected in line 4 after valid.
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If valid('0') Is True Then msgbox("HI")
End If
[code].....
I am trying to perform a task while the word count of a richtextbox is less than a user entered value, but the word count keeps coming out miles out, here is what I have:
Dim count As Integer = 0
RichTextBox1.Text = ""
Do While count < NumericUpDown1.Value
[code]....
I have created a for loop the validates a user account. however whenever i hit the button that starts he code it won't let me allow user input. I have checked a forums and other sites and its bugging me. i know its small but i don't know what i need to be doing to get out of the loop
[Code]...
I am trying to create a new class to validate user input and then call that class from my main form. I am not looking for anything to do the work for me, as this is the last part of my project but I am looking for a place to start. I tried the isNumeric IF statement but I have to create an object to reference the specific text box. Can I be generic and say that aTextBox requires validation and then call that class?
View 2 RepliesHow can I prevent users inserting sql injection in my database? How can I validate their inputs? I am new with this sql injection. I don't know how to prevent users to insert this sttmnentif and I don't have the idea of sql injection how can I be sure that I am safe with sql injection??
View 1 RepliesI have an EXE that creates objects based on params passed to it.Say I have textboxes named 57 and 21.I want to read the values entered by the end user.
Var1=57.text
Var2=21.text
How do I pull this data from the boxes?
My project consists of a user interface designed in Visual Studio 2010 Express. I have it linked to an Access database. At this time, I have two text boxes that the user will enter a number. I want to be able to write a query that will take the first and second number and pull the information from the database that is equal to or greater than the user entered number
View 6 Repliescodes one that validates that user will enter only uppercase letters in a textbox and no numbers and symbols. The second one should validate user only enters string no symbols and the third should only accept string and symbol
View 1 RepliesI have a windows form that takes username and password. It validates it with the database I have created that contains the correct usernames and passwords. So I have implemented a code to verify whether the details entered are proper..[code]
View 1 RepliesI thought I was done with the tree view control until i realised that my tree view control was behaving differently when it came to sub nodes . I have attached my treeview pic and also a sample tree view.
(-)D:
|_config.msi
|_netfile.sys
[Code]....
Since I clicked on subfolder1 i was expecting the msgbox to display D:Folder1Subfolder1 but unfortunately the msg box doesnto even have the name of the node i clicked on but when i use selectednode.text I get the correct node text. Anyways why isnt my full path working. I then tried manually designing the entire scenario using tree node editor and the code which i mentioned above works. But whenever i populate the trr programatically the above problem starts.
I Create an application that when a user enters a positive integer value in a input box(the default number is 10) when the OK button is clicked, the application should display a message box with the sum of all the integers form 1 through the value entered by the user. If the user enters a negative value, the application should display an error message. I believe I have to use a loop condition but I have no idea what to do.
EX: User enters 10 in the input box once OK button is pressed a message box pops up and says "The sum of the numbers 1 through 10 is 55". Use the following test data to determine if the application is calculating properly
VALUE SUM
5 15
10 55
20 210
100 5050
I have a report that requires the user to enter their ticket number, then they click view, and it generates. Pretty standard. What I would like to do is have the report automatically export to a pdf when they click view. Does anyone know if this is possible and how I would approach the matter?
View 1 RepliesHow do i check if user has entered all inputs and go to the next form.
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
t1.Focus()
End Sub
[code]....
In this code it gives an error, but after displaying the error it jumps to next form.
I have a datagridview and, I know I am a bit weird, but when believe it or not, when a user enters a new row I want to insert that row in the database. And even weirder, when a user changes a row in my datagridview I want to update (imagine that) the database.
View 1 RepliesHow do I prevent users from a inserting a duplicate value using SQL Query
datatype is VarChar(50)
e.g. the name field has already been defined as "Josh", I don't want it to be able to add another "Josh"
Ok so I have designed a program to figure out commissions for phone sales at my company. Since the devices we sell and their associated prices change over time, I had to make that data within my program dynamic. I have a form within my program (frmprice) that has 160 textboxes - 80 for the devices and 80 for the associated prices. Now I hard coded the .text members with default values for our current stock of phones and prices.
I also added code so whenever that form with the phones and prices (frmprice) closes it saves any changes that have been made to either the phones or prices and when the form loads it overwrites the default data with any data that the user had entered at last run.
HERE is my logic problem. At the very first run the program is overwriting the default hard coded values with "" because no user data has ever been entered before. So when the form with the prices loads, it passes the user entered data from last run which is null because it has never run before. If I test to see if default value <> the user entered data before it executes the code to pass the user entered values it will always test to be true because the user entered data is null at first run. If I test to see if the default value is = to the user data it will always at first run test to be false because there is no user data yet.
HOWEVER once the user entered data is initialized (anytime after the first run) I need the program to pass the user data from the previous runs back in. Just NOT at the first run. Here is the code i am using: (in the code below the variables ending in "val" are the ones that are of the type string and are saved in the application settings) The frmprice_Load Event:
[Code]....