Tutorials
Resources
Forum
Reviews
Communities
Interview
Jobs
Projects
Training
Your
Ad
Here
Silverlight Games
|
Mentor
|
Code Converter
|
Articles
|
Code Factory
|
Computer Jokes
|
Members
|
Peer Appraisal
|
IT Companies
|
Bookmarks
|
Polls
|
Revenue Sharing
|
Lobby
|
Gift Shop
|
Prizes & Awards
My Profile
Sign In
Register
AdSense Revenue
Active Members
Today
srinivas kante...
(67)
Alwyn
(63)
Abhisek Panda
(42)
Last 7 Days
Alwyn
(727)
nishithraj
(512)
Gaurav Arora
(503)
more...
Resources
»
Articles
»
.NET Framework
»
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
to add tags.
(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
!
More Resources
Error Handling in VB.Net
Deployment for DotNet applications (Windows Application)
Delegates in VB.NET
Move Files One system to another system
How to write an XML doccument from database query
Creation of Array Of Text Boxes at the runtime
dotNet Slackers
About Us
Contact Us
Privacy Policy
Terms Of Use