how can i limit a user to enter 10 digit no like telephone no in textbox without using regular expressions?????

Member Avatar
Member Avatar
+0 forum 16

I was working on C# windows application as front end and SQL as back end I have display my sql table data in dtatgridview. [B]I want to display the data in textbox whatever row i select in datagridview.[/B] I have write some code but its not showing data in textboxes. here is my code: [B]the code is on datagridview cellcontentclick event[/B] [CODE] cn.ConnectionString = "Data Source=sam-AB59A9C19;Initial Catalog=master;Integrated Security=True"; cn.Open(); SqlCommand cmd = new SqlCommand(); SqlDataReader rdr; string cd = dataGridView1.SelectedRows.ToString(); string CommandText = "select * from acc where id=@id"; cmd = new SqlCommand(CommandText); cmd.Connection = cn; cmd.Parameters.Add(new SqlParameter("@id", System.Data.SqlDbType.VarChar, 20, …

Member Avatar
Member Avatar
+0 forum 10

Hi Friends, I have some dynamic text box in my screen, i have entered only one text field of the screen, after submitting the form all the values of the dynamic text box field is getting added in the database as 0 except the value i entered. i have used array method to add. But i want to add only the value i entered in the respective text box in my database [B]Note:-[/B] I have enclosed the screen for your reference Please help me to solve the issue [B]At present my output is[/B] 1. xxxx xxxx 1 60.00 2. xxxx …

Member Avatar
Member Avatar
+0 forum 6

Hi! I'm new in vb.net.. I want to make an auto search textbox without using any button and will display the data after inputting the ID on the textbox.. does anyone know how to do this??

Member Avatar
Member Avatar
+0 forum 2

How to get values from listview and display it to textbox using sql database ? and then i can update the items in listview using a button..then refresh the listview after i click the button... tnx for the help in advance..im just a newbie in vb.net ![0da2d193278007986792bf92e19433ab](/attachments/large/4/0da2d193278007986792bf92e19433ab.png "0da2d193278007986792bf92e19433ab")

Member Avatar
Member Avatar
+0 forum 9

Assuming my second byte in hex is a representation of the message length, how can I dynamically adjust the length of the message the user can key into the textbox based on the hex value of the second byte? Message Byte entries into textbox: xx **xx** xx xx xx xx xx xx xx xx xx xx ..... where x is 0-9, a-f in hex. The code below was used as a sort of my goal keeper to allow only hex entry into the textbox but I want to further enhance the code below with the additional function mention above? Sorry …

Member Avatar
+0 forum 0

Hi Dw. I'm developing a Client Server application. At the moment I can connect the two and send data. The main aim is to make a server as a core control. The server only perform actions according to each client request, so the client can request to connect to let say "@Bob" where in my database on the first time "@Bob" initialized a connection with a server he registered a username "@Bob" and the server will capture the IP address of "@Bob" as well as the username "@Bob" and registered it on a database so that when let say "@John" …

Member Avatar
Member Avatar
+0 forum 14

A 24 hex byte message entries: xx xx xx xx xx xx xx xx xx xx xx xx I have a 24 hex byte message entry into a textbox with different byte segment entry requirements, how to code dynamically the range of hex value I require for each segment e.g. 1byte, 4, 5byte or any byte requirement? I tried the code below but is not what I wanted as it converts whole hex entry into int equivalent without giving me the freedom to code the range I wanted. outputTxt.Text = String.Join(" ", hexTextBox.Text.Trim().Split(' ').Select(item => Convert.ToInt32(item, 16))); For example, the …

Member Avatar
Member Avatar
+0 forum 5

For example, In VB 6.0 - Object Browser If we click on any Classes or Members down side it will show multi line text. How can i do that?

Member Avatar
Member Avatar
+0 forum 5

Hello every one. I have a form in VB.Net, as attached, I need to code the OK button. The Transfer From combobox and Transfer To combobox get all there values from the same table. The amount being transfered is keyed in via a textbox. Once the amount has been transferred, both values should be updated i.e Transfer From value should decrease while Transfer To value should increase. Remember, it is using one table (single table) whose information should be updated whenever a transaction occurs. How do I overcome this?

Member Avatar
Member Avatar
+0 forum 2

Hello I've problem with reading a text file and using it in textbox and combobox combination. I've got text file ( which I open easly ) where the data is presented like this: > English cat dog cow > French chat chien vache What I want to do is to - from combobox you choose first column (option one is English etc) and than in three different textboxes you get like cat in first etc. What I have right now - I can open file, fill the combobox as I want, but don't know how to fill textboxes. I don't …

Member Avatar
Member Avatar
+0 forum 1

so i have a combox that will tell you that which data will appear like "name", "contacts","website","email" and data will appear in gridview but i want to filter the data in gridview example in name if you type a all data starting with a will appear and everything starts with b-z will disappear and ab all with data with ab will appear and the rest will disappear in contacts same as a if i type 0 it will appear and everyhing starts with 1-9 dissappear here the code for combobox Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) …

Member Avatar
Member Avatar
+0 forum 1

Hi.. I want to upload a file with help of FileUpload control, in which, i want to save the file with a specific name or say a name entered in a textbox on a same page. for ex, if textbox contains "ABC" then the files should be uploaded with abc.jpg name. how can i restrict user to select only specific types of file in a fileupload control? also, how can i save an image in 3 different sizes at time of uploading? when user selects an image, it should be saved in some specific size in a specified folder with …

Member Avatar
Member Avatar
+0 forum 10

I have a problem that I am really having a hard time with. I have a textbox in my form that I am trying to add into autocomplete so when I get back into that form I can just type the first letter and have it populate. I have a textbox that I type a manufactures name into (ex. Konica Minolta) and at the button I have this code to save the textbox1.text into the autocomplete properties Dim MySource As New AutoCompleteStringCollection() Dim add As String add = TextBox1.Text MySource.Add(add) TextBox1.AutoCompleteCustomSource = MySource TextBox1.AutoCompleteMode = AutoCompleteMode.SuggestAppend TextBox1.AutoCompleteSource = AutoCompleteSource.CustomSource when …

Member Avatar
Member Avatar
+0 forum 9

hi there guys! how can i add textbox using button? i know that it can be done using javascript but i was required to use php. Is it possible to do it in php? thanks

Member Avatar
Member Avatar
+0 forum 6

imports system.data.sqlclient mysqlconn = New SqlConnection mysqlconn.ConnectionString = "Data Source=" + txtServerName.Text + ";initial catalog=" + txtdatabasename.Text + ";initial catalog=" + txtshardacc.Text + ";user id=" + textusername.Text + ";password=" + txtpassword.Text Dim queryresult As Integer Try mysqlconn.Open() command = New SqlCommand("select COUNT (*) as numRows from _Char Where CharName16='" & TextBox40.Text & "'", mysqlconn) queryresult = command.ExecuteScalar mysqlconn.Close() If queryresult = 0 Then MsgBox("charactername not found ", MsgBoxStyle.Critical, "Error") Else MsgBox("(1) Username Found " & TextBox40.Text, MsgBoxStyle.Information, "Done") TextBox29.Enabled = True TextBox30.Enabled = True TextBox31.Enabled = True TextBox32.Enabled = True TextBox32.Enabled = True TextBox33.Enabled = True TextBox34.Enabled = True TextBox35.Enabled …

Member Avatar
Member Avatar
+0 forum 4

Dear... I'm doing INVENTORY PROJECT... I'm using ACCESS as BACK-END... My tables are PURCHASE and SALES... In PURCHASE table, fields are CODE(primary key), PRICE, DATE, TOTAL, QTY... when I'm entering datas in form and when i click submit, the datas stored... but when i enter same DATA(CODE), it is showing error... i don't want to show the DEFAULT ERROR message... so, i want to search whether the CODE is already in database or not... i.e When i click SUBMIT button, 1st it has to search whether the CODE is already PRESENT in table or not. if it is not there, …

Member Avatar
Member Avatar
+0 forum 10

I am working with windows application, I have pictureBox to load image from the directory. I am trying to get some idea how can I display magnified image of particular area depending on the coordinates of that specific area on textbox focus.

Member Avatar
Member Avatar
+0 forum 3

Sometimes you only want to enter numeric data in a textbox. You have two options here : Let a user type whatever he/she wants into a textbox, validate the input and show him or her an annoying message that he/she has done something wrong.:angry: Or: capture the key before input, check if it's "numeric" and allow only "numerics" to come through. That way, you know the input is correct and you can proceed.:) A decimal point should be correct input, but only once. The next snippet does this and is easily adapted to allow for sientific input(+,-,e,E)

Member Avatar
Member Avatar
+1 forum 11

how to create text box dynamically at run time in java and access each textbox value to insert in database.

Member Avatar
Member Avatar
+0 forum 1

I was able to get the ComboBox to load a list of files from a directory. but, now i am trying to get the contents of that file output to a TextBox or richTextBox. I am able to use this to output to another ComboBox(however, this is not what i need...): //code for codebox to codeBox output string[] files = System.IO.Directory.GetFiles(@"c:\scripts"); comboBox2.Items.Clear(); string[] lineOfContents = File.ReadAllLines(comboBox1.Text); foreach (var line in lineOfContents) { string[] tokens = line.Split(','); comboBox2.Items.Add(tokens[0]); //end of codebox to codebox output. However, I can't get the entire file to go to a Textbox. When i use <this.richTextBox1.Text = …

Member Avatar
Member Avatar
+0 forum 4

I was able to get the ComboBox to load a list of files from a directory. but, now i am trying to get the contents of that file output to a TextBox or richTextBox. I am able to use this to output to another ComboBox(however, this is not what i need...): //code for codebox to codeBox output string[] files = System.IO.Directory.GetFiles(@"c:\scripts"); comboBox2.Items.Clear(); string[] lineOfContents = File.ReadAllLines(comboBox1.Text); foreach (var line in lineOfContents) { string[] tokens = line.Split(','); comboBox2.Items.Add(tokens[0]); //end of codebox to codebox output. However, I can't get the entire file to go to a Textbox. When i use <this.richTextBox1.Text = …

Member Avatar
Member Avatar
+0 forum 2

OleDbConnection cn = new OleDbConnection(); cn.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\`Hp\Desktop\PROGRAM1\notificationSystem\notificationSystem\Database.accdb"; OleDbCommand cmd = new OleDbCommand(); cmd.Connection = cn; //reg(); cn.Open(); cmd.CommandText = "select article from news where npublished = '" + metroDateTime1.Text + "' AND ntime = '" + label4.Text + "'"; //AND ntime = '" + label4.Text + "' //Scalar executes the fetching of data var a = cmd.ExecuteScalar(); //this statement gets the process of getting the data from the database to label if (a != null) { label1.Text = "" + a.ToString(); //while in this statement is displaying the data inside the textbox metroTextBox2.Text = label1.Text; } else if …

Member Avatar
Member Avatar
+0 forum 1

how to comute the total value I input in textbox then after that I will going to add another value and the total of both sum will display in textbox for example num1 = Val(btn.Price) * num2 = Val(btn.Quantity) then total amount display the value of num1 is 60 then the num2 is 1 in the total amount it display 60 what if i add num1 is 150 then num2 is 2 in the total amount 300 how to sum this two

Member Avatar
Member Avatar
+0 forum 1

I have basically a combobox and and a text box. What should i do is the combobox consist of subject code whereas the textbox consist of subject name which is stored in database. Can i know is there any ways that when an item from combobox is chosen, it is automatically display subject name based on subject code chosen which will be from the database. belwo is my code but not working private void FormAttendanceFaculty_Load(object sender, EventArgs e) con.Open(); OleDbDataAdapter oda1 = new OleDbDataAdapter("select code from subject where code like '%'", con); DataTable dt1 = new DataTable(); oda1.Fill(dt1); comboBoxCode.DataSource = …

Member Avatar
Member Avatar
+0 forum 2

I have a php page that lists a bunch of data including id's from a database. I then have a button next to each id that will open a Twitter Bootstrap modal window in the page and I need to pass the php variable (the id) to that model window so that I can do a mysql query in it. My issue is the model window is just displaying the textbox I setup that should be showing the unique id. However instead it is showing the textbox with just the word "null" in it. My code is below The link …

Member Avatar
+0 forum 0

How can I get the values in the textbox using the primary key as an input? example I enter the Account no and the Name,address will be displayed in the textboxes

Member Avatar
Member Avatar
+0 forum 2

Group, I've expanded a small app that started with 50 textboxes and labels to 200 of each. To hide and make these visable I use the codes lblProperty01.Visible = False tbxProperty01.Visible = True lblProperty02.Visible = False tbxProperty02.Visible = True This means there are 400 lines of code to hide and display the 200 textboxes and labels. I've got to believe there is a more efficient way to write this..... and one that will hide and display these controls much faster. Can you advise me as to what that might be? As always, thanks for your assistance! Don

Member Avatar
Member Avatar
+0 forum 8

Hi guys, am trying to populate textboxes with data from sql server database. below is the code I am trying to use in Visual studio 2012, Vb.net. Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSearch.Click Dim query As String Dim MyConnection As SqlConnection = New SqlConnection("Initial Catalog=PayRoll;" & _ "Data Source=localhost;Integrated Security=SSPI;") MyConnection.Open() query = "SELECT [Surname], [OtherNames], [NRC], [DOB] " & " FROM tblEmployees " & " WHERE EmpNo =?" Dim cmd As New SqlCommand(query, MyConnection) cmd.Parameters.AddWithValue("@badge", cmbBadgeNo.Text) Dim rdr As SqlDataReader = cmd.ExecuteReader() If rdr.Read Then txtSurname.Text = rdr.GetString(0) txtOtherNames.Text = rdr.GetString(1) txtNRC.Text = rdr.GetString(2) txtDateofbirth.Text …

Member Avatar
Member Avatar
+0 forum 2

I am desgining a userform in ArcMap, but I don't know how to sum up numeric values in a textbox (txtBox1) in another textox (txtBox2). Can anybody provide me with a vba code for that!

Member Avatar
Member Avatar
+0 forum 16

The End.