July 12, 2008
if you are facing problem of POSTBACK while working with TreeView Selected Node click, here with this post i provide you one alternative which will work on all three browsers.
follow is the sample code which you can change with your respective code.
TreeNode node = new TreeNode();
node.Text = “<span onclick=’return false;’>”+YourText+”</span>”;
this will force browser to <a href=”javascript:webform_doPostback”…….
please drop your commnet how and in what situation above code helpful to you.
Leave a Comment » |
General | Tagged: linkbutton, optionbutton, TreeView postback |
Permalink
Posted by vikasmehta
April 2, 2008
The ?? operator returns the left-hand operand if it is not null, or else it returns the right operand. For example:
int? x = null;
…
// y = x, unless x is null, in which case y = -1.
int y = x ?? -1;
The ?? operator also works with reference types:
//message = param, unless param is null
//in which case message = “No message”
string message = param ?? “No message”;
Leave a Comment » |
General | Tagged: ?? operator, null coaleascing Operator |
Permalink
Posted by vikasmehta
February 26, 2008
PreRequesthandlerExecute event is raised before the Init() method of Page or Service called. but it is not true that each and every need session and do not want to utilize their session on the same event when it is raising..
to solve this problem just single line code will helpful..
protected void Application_PreRequestHandlerExecute(Object sender, EventArgs
e)
{
if (Context.Handler is IRequiresSessionState || Context.Handler is IReadOnlySessionState)
{
// your code over here
}
}
Leave a Comment » |
General | Tagged: Global.asax, PreRequestHandlerExecute, Session State, SingleUser at a time |
Permalink
Posted by vikasmehta