473,748 Members | 7,608 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to put dynamic comma in textbox at runtime

25 New Member
sir,
how to put dynamic comma after 12 characters in textbox means 13th char is comma.... can u plz suggest me ...how i should do it...
thanx...
prem prakash...
Apr 13 '09 #1
3 2395
kadghar
1,295 Recognized Expert Top Contributor
if you're writing it from a string, why dont you check the MID function. For newer VB versions, the SUBSTRING property or the INSERT method might be of help.
Apr 14 '09 #2
QVeen72
1,445 Recognized Expert Top Contributor
Hi,

Write This in TextBox's Lost Focus Event:

Expand|Select|Wrap|Line Numbers
  1. Dim i As Integer
  2. Dim NewText As String
  3. Dim OldText As String
  4. OldText = Text1.Text
  5. NewText = ""
  6. For i = 13 To Len(OldText) Step 12
  7. NewText = NewText & Left(OldText, 12) & ","
  8. OldText = Mid(OldText, 13)
  9. Next
  10. NewText = NewText & OldText
  11. Text1.Text = NewText
  12.  
Just a Pseudo-Code, you can reifne it accordingly..

Regards
Veena
Apr 15 '09 #3
premprakashbhati
25 New Member
Thanks sir,
i got it...
Apr 15 '09 #4

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

Similar topics

1
1329
by: krs | last post by:
I am using XML/XSL to build a dynamic asp.net control at runtime. So the result of the XML/XSL transformation may result in a string such as: <asp:TextBox id="TextBox1" runat="server"> </asp:TextBox> I then use Page.parsecontrols method to create the control from the string above. This works fine for most situations but I now need to be able to have a
3
2977
by: RSB | last post by:
Hi Every one Having tuff time creating web controls Dynamically. All i am trying to do is read a table and generate a list of ASP TEXT Box. So how do i create this Control dynamically and where do i add the EventHandler to it. Thanks RSB
6
2238
by: dhnriverside | last post by:
Hi peeps, I'm trying to create some controls textboxes at runtime, based on the number of items in a IETreeView that are checked. That I can do, I've got a place holder and I can create the corrent number of controls. The problem is that they appear next to each other. I want to create the controls with some wording to the left of them (again, dynamically generated). Normally id use <table> with two colums, one for the
0
1177
by: Slam via DotNetMonster.com | last post by:
I want to create a couple of dynamic controls and the controls definitions are stored in a database. Once the the controls are created, I want to fill any dropdownlist with database values. And when a user selects or enter inputs from the dynamic controls those values will then be inserted into a database in comma delimited format. Then, when that user returns to view their selections I need those controls (textbox, dropdownlist, etc.)...
1
1220
by: arun.hallan | last post by:
I want to add at runtime, a textbox which when clicked in, displays a calender which returns a value to that textbox. Not sure how to do this dynamically at runtime. Any ideas?
0
320
by: Mike Collins | last post by:
I have a form where I create dynamic controls at runtime. With this, I am adding a dynamic required field validators to each control as needed, but the validators are not firing when I click submit. The submit button was placed at design time and its causesvalidation property is set to true. Can someone tell me if something is missing from my code? Thank you. 1. Code to add dynamic control works fine and I get the Id of the textbox...
2
4542
by: Mike Collins | last post by:
I have a form where I create dynamic controls at runtime. With this, I am adding a dynamic required field validator to each control as needed, but the validators are not firing when I click submit. The submit button was placed at design time and its causesvalidation property is set to true. Can someone tell me if something is missing from my code? Thank you. 1. Code to add dynamic control works fine and I get the Id of the textbox...
2
2204
by: remya1000 | last post by:
hai i'm using Vb.net. i'm creating 64 dynamic created buttons of 8 rows and 8 columns. And i have 1 Go button, 1 textbox. those were created dynamically. if i enter one number inside textbox and hit Go Button, then it checks corresponding Database and display buttons on page. and inside Database i have a field called Item, that tells the button number to display. for eg: if Database1 contain items 0,10,20,50. then i need to display...
2
1400
by: bharathi228 | last post by:
my code for retrieving values from database Dim da As New SqlDataAdapter("select parameter_name,parameter_units from sys_params", con) If con.State = ConnectionState.Closed Then con.Open() End If Dim ds As New DataSet Dim name, unit ,namunt As String da.Fill(ds, "sys_params")
0
8989
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8828
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9537
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9243
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6073
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4599
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4869
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3309
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.