Anas Ghanem
All about ASP.NET
-
Modifying the blogengine.net countries dropdownlist to inlclude Palestine
After I started to use Blogengine , i noticed that Palestine is not in the countries list that disaplyed in the comments box.I found the the blogenigne use the CultureInfo to get the countries based on the languages of each region.Since there is no Palestine langauge for arabic culture , the Palestine wasn't inlcluded.
-
Nod32 antivirus is blocking Visual studio Built in development server
Recently I started to face the following problem:
-
mailto: from GridView row to allow the user to send emails
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 ?
-
Hiding some page controls from the Unauthenticated users
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.
-
The 'SkinId' property can only be set in or before the Page_PreInit event for static controls
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 ....
-
How to select an item in Listview based on the DataKey
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;
}
}
-
Resetting scroll position after completion of the partial update
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).
-
Sharing ASP.NET security Database between different applications
This blog will mention the steps that is required to share the asp.net security database between different applications.
-
Changing the session ID programmatically.
In this blog, I will show how to change the Assigned session Id programmatically.
-
Securing your web site using session
When using Asp.net , there is many ways to secure your web site pages . you can use Windows authentication , Or Forms Authentication services.