in my web page i am having different hyperlinks for letter a to z and now i want to display all the details in gridview of the names starting with particular letter in my db table on clicking of hyperlink..

plz help its urgent..........

Recommended Answers

All 4 Replies

I assume, you are using DataList control for Alphabetic heading and you have added link button for each alphabetic letter I mean A, B, C ….Z …

Now, you need to set CommandArgument or CommandName property of link button with the Alphabetic character. Then you need to handle the OnCommand event of link button.

Now create one function which will accept your clicked alphabetic as argument I mean your function may looks like :

SearchData(string strSearchWord)
{
here your sql query will go and in the where clause you need to pass argument.
i.e. “where name like ' “ + strSearchWord + “%'”

then execute the query and store data in DataTable or DataSet and bind it with your Gridview.
}

========================================================================================

in my web page i am having different hyperlinks for letter a to z and now i want to display all the details in gridview of the names starting with particular letter in my db table on clicking of hyperlink..

plz help its urgent..........

thanks............now it is working

some problem ...can u plz provide some code

in my web page i am having different hyperlinks for letter a to z and now i want to display all the details in gridview of the names starting with particular letter in my db table on clicking of hyperlink..

plz help its urgent..........

Hi deeptakshd

I am thinking Just like as You but i cannot be able to Create A to Z Hyperlinks in my code because hyperlinks demanded (href) value. but i don't want to give that or redirect to other page in asp.net

Will u send me your code of syntax to control this issue.

Thanks in Advance.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.