Converting A Dropdown Selection To A Two Digit Number?

Nov 15, 2010

I have a dropdown list which has items bound to it using sql datasource.

In the database i have the numeric values corresponding to each item.

Now there are many such dropdown list's and on selection of each item i want to form a 14 digit numeric code,which i need to use further for some more functionality.

How can i convert a selected item from a dropdownlist to a numeric digit??or how can i bind the items in the dropdownlist to a database having numeric value for each item?

E.g if i select 'WT' from dropdown list the corresponding value for it in the database table is 39 so on form submit i want '39' to be formed in codebehind. likewise on selection of all items from different dropdown list the digit formed using codebehind should be '15487523568955'

View 2 Replies


Similar Messages:

SQL Server :: Converting 6 Digit Float Type Time To Hr Min Sec

Jan 4, 2011

I had a 14 digit create datetime and resolved datetime in float time format and I could parse the date using following conversion:

CONVERT(datetime, LEFT(CAST(CAST(is_resolved_datetime as BigInt) as varchar(14)),8)+' '+
SUBSTRING(CAST(CAST(is_resolved_datetime as BigInt) as varchar(14)),9,2)+':'+
SUBSTRING(CAST(CAST(is_resolved_datetime as BigInt) as varchar(14)),11,2)+':'+
SUBSTRING(CAST(CAST(is_resolved_datetime as BigInt) as varchar(14)),13,2))

If I were to extract only the time difference of two datetimes in hr:min:sec.

View 7 Replies

How To Generate A Random Number Of 16 Digit

Mar 7, 2010

I want to generate a 16 digit random account number that should be unique in database for every new user of my website. kindly guide me how can i generate a 16 digit unique number.obviouly i understand that i would have to check that number in my database table for uniqueness and if that generated number already exist then i would have to generate it again.

View 11 Replies

Display Integer As 3 Number Digit

Feb 11, 2010

When I read an integer, I cannot display it as a ### digit ..

code:

[Code]....

View 3 Replies

C# - Convert 6 Digit Number To Time?

Jan 10, 2011

Is there a function in .net that will take a number such as 134,501 and convert it to time? That time would be 1:45:01 pm. I was hoping i didn't have to reinvent the wheel for this.

View 1 Replies

Web Forms :: Creating A 4 Digit Sequential Number?

Nov 23, 2010

I am using C# 2.0 and ASP.NET.

How to create 4 digit Sequential Number (0001 to 9999).

I have a web page, where students save their information. When the students submit the page, I want to add the string "Stu" followed by the 4 digit sequence number. The sequence number should be unique. The sequence number should increment to the next sequence, when a new record is getting added.

How to achieve this?

View 1 Replies

Generate And 7 - Digit Random Number / Special Character String In VB.Net?

Dec 1, 2010

How can I generate a 7-digit random number and special character string in a textbox on a button click event, in VB.Net?

View 2 Replies

Controls :: Verification Of User Using Mobile Number By Sending 6 Digit Code As SMS

Apr 27, 2013

I want to add verification of user by sending 6 digit code to his mobile number during registration. Any way how can i do this.

View 1 Replies

Crystal Reports :: Print Number In (national) Form - Native Digit (Arabic)

Feb 25, 2016

I want to print number in the (national) form (arabic localization sys)

I tried some  solutions as here: [URL] ....

But still face problems with the stringthat contain digits ....

View 1 Replies

Forms Data Controls :: 1st Dropdown To Be Loaded On The Basis Of Selection Of 2nd Dropdown?

Oct 14, 2010

I have two dropdown linked with sqldatasources.When I select item in ddl1 then on the basis of selection ddl2 is being loaded.Is there any possiblity that if I select ddl2 then ddl1 will also load on the basis of selection?

View 3 Replies

Web Forms :: Populating A Dropdown Box With Contents Based On The Selection Of Another Dropdown Box

Sep 16, 2010

I am a complete newcomer to ASP.NET. However in the few weeks I have been playing with it I have got pretty far and have mastered things like stored procedures, gridviews, formviews and templates.I have a dropdown box which is populated from SQLDataSource1

I have a second dropdown box which is populated from SQLDataSource2, but i need the query feeding this to be dependent on what was selected in the first dropdown box. I assumed it would simply be a case of modifying the select statement on SQLDataSource2 using the SelectedIndexChanged event on the first DropDownList to update the second SQL source, but I cannot work out for the life of me how to do it. Pretty much all of the code I have is ASP.

can i do this purely in ASP rather than using VB behind the scenes or do I need to use VB? I am pretty comfortable with vb.net but one of the other issues I have is referencing an ASP object from VB... so for instance if I had a text box in ASP, how can I read or change the properties of this object from VB?

FYI I am using Visual Studio 2010 and SQL/Server

View 3 Replies

Vb.net Converting An Exponent Number To A Whole Number?

Dec 7, 2010

How can I convert a number with exponent value (such as 4.775900000000000e+004 ) to return a whole number, such as 47,759 using .net2.0 framework?

FYI, this is a weight category, not currency.

View 1 Replies

MVC :: Load Dropdown Based On Selection Of Other Dropdown?

Jan 9, 2011

I am new to MVC, I have a form in which selection of one dropdown should reload another dropdown. On selection of the dropdown, I use a jquery post to get the data and my viewstate is reloaded with new data, but I am not sure how to set the newly loaded viewdata to load the dropdown again.

View 5 Replies

C# - Luhn Check Digit / Produces 2 Length Check Digit Values?

Jun 26, 2010

I cant seem to figure out what is wrong with my check digit code!

At times, it produces 2 length check digit values

Example

1277531815000110 <-- check digit is double value??????
1277532495000110 <-- check digit is double value???????
1277534649000110 <-- check digit is double value???????
127753185300011 <-- good!
127753208500019 <-- good!

All generated numbers are valid, it can be checked at http://www.ee.unb.ca/cgi-bin/tervo/luhn.pl?N=127753224800013

CODE: http://tinyurl.com/352acpj

View 1 Replies

Forms Data Controls :: Dropdown That Inserts Data Vis Procedure If The Gridview Doesn't Have Value For The Dropdown Selection

Sep 3, 2010

i have a dropdown with month names if the user has data for the month tht is selected then gridview displays the rows with day nos as per the month but if the gridview has no data for the same the dropdown or gridview via some event should call a insert procedure to insert data into the table for tht month with daynos ad rebind the gridview witht the rows just created

View 6 Replies

Converting Number To French?

Jul 17, 2010

In ASP.net using VB, how can I Convert a number e.g 4.5 to french (4,5). And a quick question, when storing this in database, will It store as 4.5 or 45?

View 1 Replies

Converting Number To Its String (alphabetical) Representation In C#.NET?

Feb 10, 2011

as part of a project I am working on, I need to output the alphabetical 'name' of the number. This is better illustrated with an example.960Nine Hundred and SixtySo it'd convert '960' to 'Nine Hundred and Sixty'. Is there an easy way to do this in C#.NET? Also, if so, how easy would it be to apply the same function to a decimal number? I'm assuming if I can figure out how to convert a integer as above, I can just split the decimal number... so I'd have something like this 960.23 Nine Hundred and Sixty (units) andTwenty Three (units)

View 2 Replies

JQuery :: How Change 8 Digit Number Date To Original Date Format Using Jquery

Nov 10, 2010

I am using Jquery datepicker in a textbox...if user want to type the date in the format of 12202010 needs to convert to 12/20/2010...

I didn't it on the server side...but its always doing a postback once i got the focus on the textbox...

I just want to do it on the client side using jquey...

View 3 Replies

MVC :: How To Get The Data From Database On Dropdown Selection

Jan 27, 2010

in index page I have dropdown list.. I need to get the values from database based on this dropdown list and need to show that values in the grid in same page index page..

View 9 Replies

Listview Datapaging According To Dropdown Selection?

Mar 3, 2011

now i am using listview control with datapaging its working fine at the page load binding the data. when iam selecting in the dropdown value according to that value i want to bind listview and datapaging how?

View 3 Replies

Javascript - Go Other Page On Dropdown Selection Using Mvc?

Mar 11, 2010

I haev a dropdownlist box on my page.. with A B C D E Feach pages have difernt images once If I select A I need display one Image like B I need to display other image/table on the page..

View 1 Replies

VS 2010 - Presenting Large Number Of Records To User For Selection

Jul 24, 2014

I have an ASP.net VB Web app I'm working on that has a requirement to provide a list of all our component part numbers to our engineers for selection into a custom Bill of Materials for reworking of an assembly. The list of part numbers is currently generated from a stored proc in our MRP systems/SQL database. The number of records being generated is slightly over 39K part numbers.

Although the SP only takes a few seconds to generate the data the web page is taking a couple of minutes to load, primarily because of the time to fill the control presenting the records to the engineers. I've bound the data to a combobox control to the engineer. They want to be able to type the first few characters of the part number if they know it and have the list filtered or be able to just scroll the data to find the part they are looking for.

I've read elsewhere that they may be a way to only populate a certain quantity of records rather than all 39K then filter based on the users actions. Unfortunately the discussions about doing this didn't provide any examples, references, etc.

My questions are these...

Is there a better way to handle this quantity of records than a stored proc and combobox? A

ny examples of a method to populate a certain number of records then filter based on user action?

View 2 Replies

C# - Saving ID To Database Based On Dropdown Selection?

Feb 20, 2011

I am using the following code to bind BusinessID as the DataValueField of the ddlIndustry dropdown. What I want to do is save the selected ID to a different table (Company). I am doing this with ddlIndustry.SelectedValue. For some reason, the first value is always saved (1), and not the selected value.

[code]....

View 1 Replies

Can Change Textarea Or Dropdown Selection List

May 14, 2010

the formview in data tools in asp.net by default gives textbox in insert mode template.

how to change this to textarea or dropdown selection list?

View 1 Replies

Web Forms :: Change Image On Dropdown Selection?

Aug 20, 2010

I have a web page which has a DropDownList & image with links... The issue is when SelectedIndex of DropDownList is changed the image should change according to some condition and also href & link text should change accordingly.. some thing like

say :

I have 3 items in DropDownList : 1> Google 2>Yahoo 3> Orkut

Image1(Google Logo) Visit Google(Text link)

when user selects Yahoo : The Image1 should change( to Yahoo Logo) and Text should change( to Visit Yahoo)

View 5 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved