Beispiel #1
0
 /// <summary>
 /// Opens the specifiled url page in the new pop-up window when user clicks on it.
 /// To bind this behaviour with the specified control, you must call this from the 'Page_Load' event handler method.
 /// </summary>
 /// <param name="wc">The web control for which attributs will be added for OnClick javascript.</param>
 /// <param name="url"></param>
 /// Last change: 28-12-2005
 public static void AddOpenNewWindow(WebControl wc, Uri urlToOpen)
 {
     //refine the url
     urlToOpen = new Uri("\"" + urlToOpen.OriginalString + "\"");
     //now add the url appropriately
     wc.Attributes.Add(OnClick, ClientScriptHelper.GetScriptFullLine("window.open(" + urlToOpen.OriginalString + ")"));
 }
Beispiel #2
0
 /// <summary>
 /// Get forward page regarding the number of bowser forward history when user clicks on it.
 /// To bind this behaviour with the specified control, you must call this from the 'Page_Load' event handler method.
 /// </summary>
 /// <param name="wc">The web control for which attributs will be added for OnClick javascript.</param>
 public static void AddForwardWindow(WebControl wc)
 {
     ClientScriptHelper.AddForwardWindow(wc, 1);
 }
Beispiel #3
0
 /// <summary>
 /// Get back to the previous page regarding the number of bowser back history when user clicks on it.
 /// To bind this behaviour with the specified control, you must call this from the 'Page_Load' event handler method.
 /// </summary>
 /// <param name="wc">The web control for which attributs will be added for OnClick javascript.</param>
 /// <param name="noToBack">The number of times to get back regarding browser back</param>
 public static void AddBackWindow(WebControl wc, int noToBack)
 {
     wc.Attributes.Add(OnClick, ClientScriptHelper.GetScriptFullLine("history.back(" + noToBack + ")"));
 }
Beispiel #4
0
 /// <summary>
 /// Closes the current window when user clicks on it .
 /// To bind this behaviour with the specified control, you must call this from the 'Page_Load' event handler method.
 /// </summary>
 /// <param name="wc">The web control for which attributs will be added for OnClick javascript.</param>
 public static void AddCloseWindow(WebControl wc)
 {
     wc.Attributes.Add(OnClick, ClientScriptHelper.GetScriptFullLine("window.close()"));
 }
Beispiel #5
0
 /// <summary>
 /// Opens the specifiled url page in the new pop-up window when user clicks on it.
 /// To bind this behaviour with the specified control, you must call this from the 'Page_Load' event handler method.
 /// </summary>
 /// <param name="wc">The web control for which attributs will be added for OnClick javascript.</param>
 /// <param name="url"></param>
 /// Date created: 28-12-2005
 public static void AddOpenPopupWindow(WebControl wc, Uri urlToOpen)
 {
     wc.Attributes.Add(OnClick, ClientScriptHelper.GetScriptFullLine("window.open(\"" + urlToOpen.OriginalString + "\",null, \"height=400,width=600,status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes,top=100,left=100\");"));
 }
Beispiel #6
0
 /// <summary>
 /// Shows the 'Print Dialogue' when user clicks on it and after then when they select the button, the current page will be printed.
 /// To bind this behaviour with the specified control, you must call this from the 'Page_Load' event handler method.
 /// </summary>
 /// <param name="wc">The web control for which attributs will be added for OnClick javascript.</param>
 public static void AddPrint(WebControl wc)
 {
     wc.Attributes.Add(OnClick, ClientScriptHelper.GetScriptFullLine("window.print()"));
 }
Beispiel #7
0
 /// <summary>
 /// Get forward page regarding the number of bowser forward history when user clicks on it.
 /// To bind this behaviour with the specified control, you must call this from the 'Page_Load' event handler method.
 /// </summary>
 /// <param name="wc">The web control for which attributs will be added for OnClick javascript.</param>
 /// <param name="noToforward">The number of times to get forward regarding browser forward</param>
 public static void AddForwardWindow(WebControl wc, int noToForward)
 {
     wc.Attributes.Add(OnClick, ClientScriptHelper.GetScriptFullLine("history.forward(" + noToForward + ")"));
 }