473,396 Members | 1,886 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

HTML file handling/modification in Visual Basic .NET application

Hi,
We're implementing a Windows application using Visual
Basic .NET.
One of the key features we need to implement is that we
should be able to get the accurate byte offset of user
selected text in the file.
We've been trying to use the RichTextBox control to load
a file, and get the offset when the user selects some
text in the file. It's been working ok with regular text
files, but we can't use the RichTextBox control to handle
an HTML file.
We're looking for a control that loads a HTML file,
displays it correctly like web-browser, and
1. can get(return) actual position or byte offset
of user selected text
OR
2. has a feature to allow us to modify HTML source,
and put some tags into the specific location, which user
selected

We want to keep the original HTML source as much as
possible if we need to put our own tags into the file to
remember the selected location.
We've tried some third-party controls that can load HTML
file in VB form, but none of them have the features that
we need, and some of them have some issues like modifying
(converting) original HTML source which we don't want.
Please let us know how to implement this.

Thanks.

Nov 22 '05 #1
7 3086
Hi,

Thanks for your post. As I understand, you want to create a HTML designer
of you own which is able to edit the HTML source and view the result within
your application. Please correct me if there is any misunderstanding. Now
I'd like to share the following information with you:

1. Based on my experience, I suggest you to create two views in your
application. One is a text editor for a user to edit HTML source; the other
hosts a web browser control which displays the result of the edit view.
Just like IE where I can edit the source outside say, Word, Notepad,
FrontPage, etc.

The following articles describes using Web Browser in C# and VB.NET:
http://www.c-sharpcorner.com/Interne...serInCSMDB.asp

2. If you want a WYSIWYG HTML designer control like those in Visual Studio
..NET IDE, ProntPage, etc, I did a search on www.google.com but did not find
an existing control. We are able to implement one ourselves by applying the
HTML specification, however, it is a time-consuming task and I do not
recommend.

HTML 4.01 Specification
http://www.w3.org/TR/html4/

Please feel free to let me know if you have any problems or concerns.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 22 '05 #2
Tian Min,

Thanks for your response.
Actually, we're not looking for a HTML designer
implementation.
In our application, users see a HTML page(not the source)
just like you see a HTML file in any web browser.
And, when users select some text from anywhere in HTML
viewer, WebBrowser control, HTML control or whatever, we
need to be able to get the exact location of selected
text, so that we can store the offset or something to
reuse it next time.
So, if there is a way to get the exact location(offset)
of selected text, we can then modify the source to put in
a ID tag or something that represent the text has been
selected by user.
Am I addressing our issue clearly? Please let me know.
Thanks again.

Jay

-----Original Message-----
Hi,

Thanks for your post. As I understand, you want to create a HTML designerof you own which is able to edit the HTML source and view the result withinyour application. Please correct me if there is any misunderstanding. NowI'd like to share the following information with you:

1. Based on my experience, I suggest you to create two views in yourapplication. One is a text editor for a user to edit HTML source; the otherhosts a web browser control which displays the result of the edit view.Just like IE where I can edit the source outside say, Word, Notepad,FrontPage, etc.

The following articles describes using Web Browser in C# and VB.NET:http://www.c- sharpcorner.com/Internet/WebBrowserInCSMDB.asp
2. If you want a WYSIWYG HTML designer control like those in Visual Studio.NET IDE, ProntPage, etc, I did a search on www.google.com but did not findan existing control. We are able to implement one ourselves by applying theHTML specification, however, it is a time-consuming task and I do notrecommend.

HTML 4.01 Specification
http://www.w3.org/TR/html4/

Please feel free to let me know if you have any problems or concerns.
Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
.

Nov 22 '05 #3
Hi Jay,

Thanks for your feedback. As you know, the web browswer will tranlate the
HTML tags and render the content in its view. When a user select some text
anywhere in HTML viewer, I suggest that you may need to get both the
content and coordinate of the text in the HTML viewer and then search it in
the HTML file.

Please feel free to let me know if you have any problems or concerns.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 22 '05 #4
Hi Jay,

Thanks for your feedback. As you know, the web browswer will tranlate the
HTML tags and render the content in its view. When a user select some text
anywhere in HTML viewer, I suggest that you may need to get both the
content and coordinate of the text in the HTML viewer and then search it in
the HTML file.

Please feel free to let me know if you have any problems or concerns.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 22 '05 #5

Hi Tim,
Thanks for your responses.
Actually, I'm trying to test with MSHTML + WebBrowser
control as Peter Huang suggested in
<http://support.microsoft.com/newsgroups/default.aspx?
ICP=GSS3&NewsGroup=microsoft.public.dotnet.languag es.vb>
I'm not sure if that will work for my project yet, but it
seems like the right way to go.
Thanks again.

Jay
-----Original Message-----
Hi Jay,

Thanks for your feedback. As you know, the web browswer will tranlate theHTML tags and render the content in its view. When a user select some textanywhere in HTML viewer, I suggest that you may need to get both thecontent and coordinate of the text in the HTML viewer and then search it inthe HTML file.

Please feel free to let me know if you have any problems or concerns.
Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
.

Nov 22 '05 #6

Hi Tim,
Thanks for your responses.
Actually, I'm trying to test with MSHTML + WebBrowser
control as Peter Huang suggested in
<http://support.microsoft.com/newsgroups/default.aspx?
ICP=GSS3&NewsGroup=microsoft.public.dotnet.languag es.vb>
I'm not sure if that will work for my project yet, but it
seems like the right way to go.
Thanks again.

Jay
-----Original Message-----
Hi Jay,

Thanks for your feedback. As you know, the web browswer will tranlate theHTML tags and render the content in its view. When a user select some textanywhere in HTML viewer, I suggest that you may need to get both thecontent and coordinate of the text in the HTML viewer and then search it inthe HTML file.

Please feel free to let me know if you have any problems or concerns.
Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
.

Nov 22 '05 #7
Hi Jay,

Thanks a lot for your information. I am very glad to hear that Peter's
suggestion will help you! If you have any problems, please feel free to
post in the thread in dotnet.languages.vb or to this thread.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 22 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: mustafa | last post by:
Dear sir , I have built my application in visual basic 6.0 and crystal Report8.5 , Now i migrated my application to VB.net using the upgrade wizard.My visual basic form is upgraded to vb.net...
6
by: Danny Lesandrini | last post by:
I'm using an Access database to drive a web site and the colors of various table backgrounds are stored in Access. I want users of the Access database to be able to select colors for the site, but...
2
by: Hazzard | last post by:
I just realized that the code I inherited is using all asp.net server controls (ie. webform controls) and when I try to update textboxes on the client side, I lose the new value of the textbox when...
4
by: Kenneth Keeley | last post by:
Hi, I have a page that uploads files to my server and I wish to display a "Please wait while uploading" page to the user while the file is uploading. I have been able to redirect the user once the...
17
by: Lloyd Sheen | last post by:
This IDE is driving me nuts. I needed another button so I copied an existing one, changed the Text and the id and position by drag and drop. Well then I run and get the following: Control...
14
by: Al Smith | last post by:
I need help in implementing proper error handling. I am trying to upload a file based on the sample code below. The code works well except if the file selected is too big. I do know about the...
9
by: Jay Kim | last post by:
Hi, We're implementing a Windows application using Visual Basic .NET. One of the key features we need to implement is that we should be able to get the accurate byte offset of user selected...
17
by: marks542004 | last post by:
Hi all , I am an old programmer now hobbyist who has used cobol, basic, and RPG . I am new to c++ but have Microsoft Visual Studio 6.0. I have a program in Basic that reads a file , looks for...
1
by: =?Utf-8?B?TWF1cmljZQ==?= | last post by:
Greeings: Looking for guidance in adding a feature. I would like for authorized users to be able to log into a frontpage 2002 website that I created/published and add laboratory results to data...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.