Click here to Skip to main content
15,888,610 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
i have to make a dynamic id in textbox on register form.

i have to make that ID in this format(300812NEAU) in which 300812 is the 30 august(08) 12 (2012). and NE prefix come from the NEWYORK and AU comes the Australia.
and the values NE & AU i have to take from textbox or either dropdownlist.

and i have done the 300812 part . ihave take this value in ID. but the rest NE and AU how can i take these values.
Posted
Comments
Sandeep Mewara 30-Aug-12 8:11am    
Not clear on what are you trying to ask.
Ravimcts 30-Aug-12 8:25am    
i have to generate this ID 300812NEAU format. 300812 is the 30 august(08) 12 (2012). NE prefix come from the NEWYORK and AU comes the Australia. so tell me how to do this..
i have take 300812 by using this code

TextBox18.Text = DateTime.Now.ToString("ddMMyy");
Ravimcts 30-Aug-12 8:50am    
i have to generate this ID 300812NEAU format. 300812 is the 30 august(08) 12 (2012). NE prefix come from the NEWYORK and AU comes the Australia. so tell me how to do this.. i have take 300812 by using this code TextBox18.Text = DateTime.Now.ToString("ddMMyy");
nika2008 30-Aug-12 9:19am    
NEAU u must take them from serverlocation or client location?
Sandip.Nascar 30-Aug-12 10:30am    
The question is not very clear. Do you have the textbox with already generated id and you want to take the date part and the city/county part.
If so, why don't you take the id in a string and do some parsing routine to extract the 3 parts and do your next step?

Now, if you want to generate the id with this logic, again the datepart is quite straight forward and you concatenate city prefix and country prefix.

1 solution

SQL
SELECT        LEFT(REPLICATE('', 2) + country_name, 2) AS Expr1
FROM            route_defination



using this i get my fisrttwo prefix of my country and then i show these prefix to my texbox.

finally i have done .
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900