hii..i have sqldatabase from which the data is being displayed in gridview fields and i am performing edit delete operations using the link buttons.and finally i want to dispaly the record of a single row in color format but i am unable to do so.and gridview fields are boun ddata fields.plz help me out.
You can use the "RowCreated" event to find the row and set background color.
protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e)
if (e.Row.RowType == DataControlRowType.DataRow)
string id = GridView1.DataKeys[e.Row.RowIndex].ToString();
if (id = "test")
e.Row.BackColor = "pink";
Domains aren't case sensitive. abc.com is the same as ABc.Com. If you're comparing, just lower case it.
Use a regular expression for the domain part. Protocol doesn't matter. You're just interested in the domain name. From there, you can build a URL and validate it. Anything after a / is content, as per your example.
Are there any existing utility class to do this? Not all URLs begins with protocol part, like http://, and not all ends with /, so I feel hard when I try to write a parser by myself;
Yes. System.Net.Uri class does this.
Uri uri = new Uri("http://abc.com/some/address/abc.html");
Is domain case sensitive or not? i.e. abc.com the same as ABc.Com?
Usually domains are not case sensitive. But some web servers like APACHE, consider the folder names as case sensitive. Which means, www.abc.com will be equal to www.ABC.com, but www.abc.com/somefolder won't be equal to www.abc.com/SomeFolder according to apache.
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia
Suppose I have a Dictionary object instance, Dictionary<string, int>, the int is always positive. I want to get top 10 elements from the Dictionary with the maximum 10 int values, any efficient way to do this?
Quickly, off the top of my head, you could create a linked list of objects with which you will do an insertion sort. You then run the dictionary, inserting objects into the array ONLY if the value is higher than the value at position zero OR if the array is empty. When inserting a new object, just insert it in the correct place.
Wow, I was being exceptionally thick tonight. I just realized that you could just use an OrderedDictionary.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
I have a List<double> Values, where each double is an array representing one series (not from a database). I can have several dozen double and each can be 100k+ items.
I would like to display this to the user in a datagrid (I know this is a lot of information, but the user needs to be able to browse). Due to the size, it is prohibative to load the entire thing into the grid at once, instead loading rows as needed. From Google, it seems like I need to bind this data source to the datagrid.
this is for an chat application....
i want to get system ideal time for setting the user status to ideal in the chat....
supposs if the system is ideal for 2 minut, I want to change the status of the logged in user to Ideal.