Click here to Skip to main content
15,908,013 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
hello
How do I click this button?

HTML
<div  önclick="addTag();" style="float:right;width:50px;background:#E5E5E5;border:1px solid #80B5D0;line-height:21px;margin-removed3px;padding:0px 5px">add key</div>


con not:
C#
HtmlElementCollection elc = this.webBrowser1.Document.GetElementsByTagName("input");
foreach (HtmlElement el in elc)
{
    if (el.GetAttribute("value").Equals("ارسال"))
    {
        el.InvokeMember("Click");
    }
}


and
C#
webBrowser1.Document.GetElementById("btnSave").InvokeMember("click");


and
C#
webBrowser1.Document.GetElementsByTagName("INPUT")[10].InvokeMember("Click");
Posted

 
Share this answer
 
Comments
samadblaj 7-Oct-13 14:42pm    
woy ? number post?
hello professional

here you need to Make your tag behave as a block level element and give it the same size as to the parent element.

like :-

XML
<div class="wholediv">
    <a href="http://www.google.com">Your link</a>
</div>



make your this style
JavaScript
style="float:right;width:50px;background:#E5E5E5;border:1px solid #80B5D0;line-height:21px;margin-removed3px;padding:0px 5px"
in CSS:

Like :

CSS
.wholediv{
    width: 100px;
    height: 100px;
    background-color: #efefef;
}

.wholediv a {
    width: 100px;
    height: 100px;
    display:block;
    background-color: pink;
}



for more you can click here

http://stackoverflow.com/questions/18833353/how-to-make-a-div-clickable[^]

Happy to help!!
 
Share this answer
 
Comments
samadblaj 7-Oct-13 14:42pm    
no c#...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900