Web Forms :: Loop Through The Alphabet Depends On The Length?
Feb 11, 2011
i want write a coding to loop through the alphabet depends on the length.
Below is the condition i want:
total_display_all = "2,10,4,25,17" 'length = 5
Dim I_total()
As
String = total_display_all.Split(",")
Dim alphabet = string
Dim alphabet_all = string
For i = 0
To I_total.Length - 1
alphabet_all = alphabet 'don't know how to write this part of codingNext
final output i want:
when length = 5, alphabet = "A,B,C,D,E"
when length = 2, alphabet ="A,B"
when length = 10, alphabet = "A,B,C,D,E,F,G,H,I,J"
the alphabet depends on the length of total_display_all.
i don't know how to write the coding to loop through alphabet.
Text box has to allow digits and alphabets using ajax server side controls and in this if the user types small alphabets it has to convert capital how to do this using ajax server side controls?
I have a Gridview with 12 columns, Jan, Feb...Dec.
I have a textbox value that could be 1, 2,...12
I want if textbox value is 7, then column Aug-Dec in Gridview is editable when in update mode and the column in Jan-Jul is not updatable (eg make it label instead of textbox).
I have bunch pages and I need to validate data there. If culture for example "es-ES" I should use one validation logic, if culture "en-US" than another validation logic. For example I need validate phone number. Minimum length is 11 digits. For other culture 9 digits.
I'm developing an sms application in c#. The service that I use to send a message only allows characters form the 7 bit alphabet. I'm looking for a way to check if a message only contains characters from this alphabet.
My first idea was to split the message into a character array and then loop these characters and compare them to the alphabet. But I bet there is a much better.
am displaying student attendance in Grid view.I choose absent as A, present as P and leave as L. Now i would like to display A in red color, P in green
Say that, there is a login.aspx page for any application. I would like to see this login page in different format if user visit by Iphone or any other mobile device. I have already designed two different page for test purposes. If i visit the page which is modified for Iphone, everything works fine.
what is the best way to switch between these two page depends on by which device user visit? These two pages could be even totally different two pages like black and white because of page layout issues.
I have a dropdownlist which contains TEACHERS and STUDENTS, and I'm using gridview to show their information. But I don't know how to display records that depends in dropdownlist.
Im stuck with declaring a string which is in a loop within another loop.
Dim CompanyDetails As String = "" Dim CompanyRow As DataRow For Each CompanyRow In newdt.Rows CompanyDetails += CompanyRow(1) & " " & CompanyRow(0) & "<br/>"...
How can I get this to see the GetInfo as declared..... since its in a loop within a loop?
I have an asp.net C# website. Because of iPhone doesn't support flash i want to change a theme of my site on page load or init if user using it. Could any one show me (code in c#) how to determine that user is browsing my website using iPhone or iPad, not a blackberry, or android etc.
I have a Range Validator as follows. It is for restricting values between 1900 and 2070. However, it fires error when I enter a alphabet also. I want this to be fired only if the user enters integer values. How do I overcome it?
My AS.net code is trying to download some from the webserver but following error is coming
"The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. "
Is there any way-out to over-come this sort of problem in ASP.net
In my application, if I do not input the value into the textfield, it will show error message: "The value '' is invalid."
However, is it possible to check one more thing: the length of the textfield? For example, it will show the error message if I input more than 10 chars? And is it possible to change the message "The value '' is invalid." to "Missing Value"?
When I click on the Alphabets it will show the details of a player...however, when that particular letters has no details of the player..I want to show."No results can be found"..Is there anyway to do it?
I have a two-character field for US State. I add a RegularExpressionValidator control to validate the input using
ValidationExpression="[a-zA-Z]{2}"which works to validate the content when something's entered, but it doesn't catch if someone just leaves the textbox blank.
Is there any way to validate within the same regex to catch an empty textbox?