Posts

Showing posts from July, 2014

How to "PUT" and "GET" queue item IBM WebSphere Queue - C#

This is example C# code how to insert value into IBM WebSphere  Queue, and Get The Queue value back. You can use Queue to store some information to processed later without involve database. You can read more about IBM WebSphere queue in here Put Message C# Code MQQueueManager queueManager;             MQQueue queue;             MQMessage queueMessage;             MQPutMessageOptions queuePutMessageOptions;             MQGetMessageOptions queueGetMessageOptions;             string ChannelInfo;             string channelName;             string transportType;             string connectionName;             //get channel info             char[] separator = { '/' };             string[] ChannelParams;             ChannelInfo = "CHANNEL3/TCP/172.19.37.2";             ChannelParams = ChannelInfo.Split(separator);             channelName = ChannelParams[0];             transportType = ChannelParams[1];             connectionName = ChannelParams[2];             //g

How to get user name of logon windows user.

This Code shows how to get user name of log on windows user. Here is the code : C# Code  string a; a = System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString(); MessageBox.Show(a.ToString()); By Mohd Zulkamal NOTE : – If You have Found this post Helpful, I will appreciate if you can Share it on Facebook, Twitter and Other Social Media Sites. Thanks =)

How to specify WhereCondition in Transformation - Nested Control - kentico 8, 7, 6

Image
Before this i wonder how to pass some where condition in transformation repeater. So i ask the kentico guys and he give me a solution which i think i can share to the others. So in your transformation you can specify the <script runat="server"></script> element. This is where you can pass the where condition. Let see the example : Transformation Code <cms:queryrepeater id="repItems" ... DelayedLoading="true" ... /> <script runat="server"> protected void Page_PreRender(object sender, EventArgs e) { queryrepeater.WhereCondition= "NodeAliasPath LIKE '"+(string)Eval("NodeAliasPath")+"'"; queryrepeater.ReloadData(true); } </script> Note : queryrepeater dont have DelayedLoading properties, use DataBindByDefault="false" instead. By Mohd Zulkamal NOTE : – If You have Found this post Helpful, I will appreciate if you can Share it on Facebook, Twitter and Other Social Media Sites

Update Panel - Handle async partial-page state with client script

This is a sample script you can put at the master page. So that you dont need to have updatepanel progress every time you add the update panel in you aspx page. Script  <div id="pageUpdating"></div>     <script type="text/javascript">         Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(BeginRequestHandler);         function BeginRequestHandler(sender, args) {             //page is begin request, you can put code to lock screen etc.               writePageLoading();         }         Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequestHandler)         function endRequestHandler(sender, args) {             //page load successfully , end request               RemoveLoading();             if (args.get_error() != undefined && args.get_error().httpStatusCode == '500') {                 //if have error                 var errorMessage = args.get_error().message;                 alert(errorMessage + &qu