|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| 10/09/2009 at 06:27AM PDT, ID: 24799140 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: |
---DROP DOWN LIAST CODE
Private Sub LoadStates()
Dim dbCon As New System.Data.SqlClient.SqlConnection
Dim objCmd As New SqlClient.SqlCommand
dbCon.ConnectionString = System.Configuration.ConfigurationManager.AppSettings("strConn")
dbCon.Open()
Dim adapter As New SqlDataAdapter("select * from states where countryCode = 'US' and StateCode not in ('UM', 'AS', 'GU','MP','PR','VI' ) order by StateCode", dbCon)
Dim dt As New DataTable()
adapter.Fill(dt)
dbCon.Close()
ddlState.DataValueField = "StateCode"
ddlState.DataTextField = ProperCase("StateName", True)
If Request.QueryString("st") = "0" Then
Else
ddlState.SelectedValue = Request.QueryString("st")
End If
ddlState.DataSource = dt
ddlState.DataBind()
ddlState.Items.Insert(0, "--Select--")
End Sub
---PROPER CASE FUNCTION---
Public Function ProperCase(ByVal strText As String, Optional ByVal blnProperCaseAllWords As Boolean = False) As String
Dim strReturnValue As String
Try
If blnProperCaseAllWords Then
strReturnValue = StrConv(strText, VbStrConv.ProperCase)
Else
Dim strBuilder As New System.Text.StringBuilder
strBuilder.Append(LCase(Trim(strText)))
strBuilder.Chars(0) = UCase(strBuilder.Chars(0))
Dim arrEndChars(2) As String
arrEndChars(0) = ". "
arrEndChars(1) = "! "
arrEndChars(2) = "? "
strReturnValue = strBuilder.ToString
For i As Integer = 0 To UBound(arrEndChars)
Dim intStartPos As Integer = 1
While strReturnValue.IndexOf(arrEndChars(i), intStartPos) > 0
Dim intIdx As Integer = strBuilder.ToString.IndexOf(arrEndChars(i), intStartPos)
strBuilder.Chars(intIdx + 2) = UCase(strBuilder.Chars(intIdx + 2))
strReturnValue = strBuilder.ToString
intStartPos = intIdx + 2
End While
Next
End If
Catch ex As Exception
strReturnValue = strText
End Try
Return strReturnValue
End Function
|
Advertisement