Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2014
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. object control = BrowserWindow.ExecuteScript('$('#yourControlId'););
  2.  
  3. protected void PerformAction(object control)
  4. {
  5. HtmlDiv htmldiv = ((List<object>)control)[0] as HtmlDiv;
  6. HtmlSpan htmlspan = null;
  7.  
  8. if (htmldiv == null)
  9. {
  10. htmlspan = htmldiv [0] as HtmlSpan ;
  11.  
  12. if (htmlspan == null) return;
  13.  
  14. // Write your action
  15. }
  16.  
  17. if (htmldiv == null && htmlspan == null) return;
  18. // Do your code
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement