Tutorials
Resources
Forum
Communities
Interview
Jobs
Projects
Offshore Development
Silverlight Tutorials
|
Mentor
|
Code Converter
|
Articles
|
Code Factory
|
Computer Jokes
|
Members
|
Peer Appraisal
|
IT Companies
|
Bookmarks
|
Revenue Sharing
|
Prizes & Awards
My Profile
Sign In
Register
AdSense Revenue
Active Members
Today
Abhi
(48)
divya
(34)
Babu Akkandi
(28)
Last 7 Days
Appukuttan
(620)
Babu Akkandi
(465)
Tejinder Singh ...
(273)
more...
New Feature:
Community Sites
:
Create your own .NET community website and start earning from Google AdSense !
It's Free !
How disable link navigation in webbrowser control of C#.NET 2005
Posted Date: 27 Jun 2006
Resource Type:
Articles
Category:
.NET Framework
Author:
DotNetJaps
Member Level:
Gold
Rating:
Points
: 5
We can disable link navigation in web browser control of C#.NET 2005 with help of three events and a creating event handler as following
private bool bCancel = false;
private void webBrowserTandy_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
int i;
for (i = 0; i < webBrowserTandy.Document.Links.Count; i++)
{
webBrowserTandy.Document.Links[i].Click += new
HtmlElementEventHandlerthis.LinkClick);
}
}
private void LinkClick(object sender, System.EventArgs e)
{
bCancel = true;
MessageBox.Show("Link Was Clicked Navigation was Cancelled");
}
private void webBrowserTandy_Navingating(object sender, WebBrowserNavigatingEventArgs e )
{
if (bCancel == true)
{
e.Cancel=true;
bCancel = false;
}
}
For the Vb.NET version of this please refer this link:
http://www.vbdotnetforums.com/showthread.php?p=33394
http://jalpesh.blogspot.com
Responses
No responses found. Be the first to respond and make money from
revenue sharing program
.
Feedbacks
Popular Tags
What are tags ?
Search Tags
Sign In
(No tags found.)
Post Feedback
This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must
Sign In
to post a response.
Next Resource:
Error Handling in VB.Net
Previous Resource:
Printing Invoices in C#
Return to Discussion Resource Index
Post New Resource
Category:
.NET Framework
Post resources and
earn money
!
Related Resources
Cryptography in .NET
Converting string to Date object
Exceptional Handling at all Levels
Multithreading in .NET # UI thread & Worker threads
Message Queuing – A boon to Enterprise Network
dotNet Slackers
BizTalk Adaptors
Web Design
Contact Us
Privacy Policy
Terms Of Use