If you want to create a HyperLinks in the GridView , so that if the user click on one link the outlock (or email client) will be opened and carry the clicked email ?
If you want to hide controls in the page that is being displayed by the logged in and not logged in users , then you can check the Request.IsAuthenticated property which returns true if the user is logged in ( of course you must be using Windows or Forms authentication). For example, If you want to hide a button from the anonymous users , you can write : Button1.Visible=Request.IsAuthenticated; If you have many controls that you want to hide , you can group them inside a Panel : Panel1.Visible=Request.IsAuthenticated; This will hide the Panel including the controls inside it.
If you get that error , then you would probably is trying to set the SkingId programatically.Note that if you are adding your control dynamically, you should assing that proeprty before adding the control to it's parent.I noticed this issue also when the developers trying to set the skinId for the controls that are inside another controls like GridView,Datalist,Repeater,ListView ....
If you want to Select a listView item based on a Key , you can handle it's ItemDatabound event like below:
private int YourKeyValue = 3;
protected void ListView1_ItemDataBound(object sender, ListViewItemEventArgs e)
if (e.Item.ItemType == ListViewItemType.DataItem)
ListViewDataItem di =(ListViewDataItem) e.Item;
int CurrentItemValue = int.Parse(ListView1.DataKeys[di.DataItemIndex].Value.ToString());
if (CurrentItemValue == YourKeyValue)
ListView1.SelectedIndex = di.DataItemIndex;
When you use the UpdatePanel to implement partial updates,the scroll position will be maintained between the asynchronous post-backs.However,you may need to reset the scroll position after the partial update completed ( after receiving the response).