C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !






ASP.Net Looping through from A to Z


Posted Date: 07 Feb 2008    Resource Type: Code Snippets    Category: ASP.NET WebForms

Posted By: Vanitha Govintharaj       Member Level: Gold
Rating:     Points: 7



If you have a list of Names in grid or in Dataset order by Name.
We have to move to the pages based on the search character if its found.
If not found then it should be search for next character.

There is an easiest way to achieve this....


Use the function.....


Dim SearchStr As String
'Get one character from left
SearchStr = Left(txtSearchStr.Text, 1)
While (SearchStr <> "")
'If is numeric then no problem increase the number and search
If IsNumeric(SearchStr) Then
SearchStr = Val(SearchStr) + 1
Search(SearchStr)
Else
'If alphabet
Dim ASCII As Integer
'Get the ascii value
ASCII = AscW(SearchStr)
'Increase by one and again search for the character
SearchStr = ChrW(ASCII + 1)
Search(SearchStr)
End If
End While


Above function pass the character, use that character for search........


Sub Search(ByVal Str As String)
'Check for the character in Grid or in Dataset by loop through the dataset
End Sub







Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: RegisterStartupScript while using AJAX Update Panel
Previous Resource: ASP.Net Message Box
Return to Discussion Resource Index
Post New Resource
Category: ASP.NET WebForms


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

it outsourcing

Contact Us    Privacy Policy    Terms Of Use