Advertisement
jovanovski

ИТ Лаб1 Blur

Mar 19th, 2014
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.71 KB | None | 0 0
  1. protected void Page_Load(object sender, EventArgs e)
  2.     {
  3.         if (IsPostBack){
  4.             var ctrlName = Request.Params[Page.postEventSourceID];
  5.             var args = Request.Params[Page.postEventArgumentID];
  6.             HandleCustomPostbackEvent(ctrlName, args);
  7.         }
  8.     }
  9.  
  10.  
  11.     protected void Page_Init(object sender, EventArgs e)
  12.     {
  13.         var onBlurScript = Page.ClientScript.GetPostBackEventReference(txtPoraka, "OnBlur");
  14.         txtPoraka.Attributes.Add("onblur", onBlurScript);
  15.     }
  16.  
  17.  
  18.     private void HandleCustomPostbackEvent(string ctrlName, string args)
  19.     {
  20.         if (ctrlName == txtPoraka.UniqueID && args == "OnBlur"){
  21.            //Се деси блур!
  22.         }
  23.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement