/// <summary>
/// This function strips all the html tags from the input string
/// </summary>
/// <param name="strHtml">HTML string</param>
/// <returns>Text string in RTF format</returns>
private function stripHtml(string strHtml) as string
{
System.Text.RegularExpressions.Regex objRegExp = new System.Text.RegularExpressions.Regex("<(.|\n)+?>");
/// <summary>
/// This function strips all the html tags from the input string
/// </summary>
/// <param name="strHtml">HTML string</param>
/// <returns>Text string in RTF format</returns>
private function stripHtml(string strHtml) as string
{
System.Text.RegularExpressions.Regex objRegExp = new System.Text.RegularExpressions.Regex("<(.|\n)+?>");
string strOutput = objRegExp.Replace(strHtml, " ")
strOutput = strOutput.Replace("<", "<")
strOutput = strOutput.Replace(">", ">";
return strOutput
}
This looks like C# not VB.NET!
Click "Mark as Answer" on the post that helped you.
This earns you a point and marks your thread as Resolved so we will all know you have been helped.
FAQ on the correct forum http://forums.asp.net/p/1337412/2699239.aspx#2699239
You could also try contact@prosdk.com - that is the contact email address for his consultancy company.
Click "Mark as Answer" on the post that helped you.
This earns you a point and marks your thread as Resolved so we will all know you have been helped.
FAQ on the correct forum http://forums.asp.net/p/1337412/2699239.aspx#2699239
Yes. this is 100% freeware - but I have no spare time to enhance it, sorry!
Feel free to modify/improve it. Please keep it free, and please keep me posted.
Regards,
E.
Click "Mark as Answer" on the post that helped you.
This earns you a point and marks your thread as Resolved so we will all know you have been helped.
FAQ on the correct forum http://forums.asp.net/p/1337412/2699239.aspx#2699239
Yes! Please add my TATWORTH account in as an administrator. As soon as I can download the project, I will set up a solution with some VB.NET unit tests. Your code to write to your SQL Server database will have to remain outside the solution.
Click "Mark as Answer" on the post that helped you.
This earns you a point and marks your thread as Resolved so we will all know you have been helped.
FAQ on the correct forum http://forums.asp.net/p/1337412/2699239.aspx#2699239
Yes! Please add my TATWORTH account in as an administrator. As soon as I can download the project, I will set up a solution with some VB.NET unit tests. Your code to write to your SQL Server database will have to remain outside the solution.
You will need to choose a licence - I suggest the LGPL one as it allows commercial use while keeping the code free.
Click "Mark as Answer" on the post that helped you.
This earns you a point and marks your thread as Resolved so we will all know you have been helped.
FAQ on the correct forum http://forums.asp.net/p/1337412/2699239.aspx#2699239
chankl78
Member
337 Points
95 Posts
Re: Converting HTML RichText to RTF & Store into mssql 2005 Database
Jun 05, 2008 04:01 PM|LINK
Thanks so much.
So far, One have responsed.
I hope the author will reply soon.
sbakshi
Participant
1147 Points
222 Posts
Re: Converting HTML RichText to RTF & Store into mssql 2005 Database
Jun 06, 2008 04:22 AM|LINK
Hi Chan,
Here is your VB code:
/// <summary>
/// This function strips all the html tags from the input string
/// </summary>
/// <param name="strHtml">HTML string</param>
/// <returns>Text string in RTF format</returns>
private function stripHtml(string strHtml) as string
{
System.Text.RegularExpressions.Regex objRegExp = new System.Text.RegularExpressions.Regex("<(.|\n)+?>");
string strOutput = objRegExp.Replace(strHtml, " ")
strOutput = strOutput.Replace("<", "<")
strOutput = strOutput.Replace(">", ">";
' I dont know which expression below will return the value from function. Please try both
stripHtml = strOutput
return strOutput
}
Hope it works
Sitanshu
Please "Mark as Answer" if my post sort your problem
Blog: http://sharp-architecture.blogspot.com/
TATWORTH
All-Star
72415 Points
14017 Posts
MVP
Re: Converting HTML RichText to RTF & Store into mssql 2005 Database
Jun 09, 2008 11:38 AM|LINK
Hi Chan,
Here is your VB code:
/// <summary>
/// This function strips all the html tags from the input string
/// </summary>
/// <param name="strHtml">HTML string</param>
/// <returns>Text string in RTF format</returns>
private function stripHtml(string strHtml) as string
{
System.Text.RegularExpressions.Regex objRegExp = new System.Text.RegularExpressions.Regex("<(.|\n)+?>");
string strOutput = objRegExp.Replace(strHtml, " ")
strOutput = strOutput.Replace("<", "<")
strOutput = strOutput.Replace(">", ">";
return strOutput
}
This looks like C# not VB.NET!
This earns you a point and marks your thread as Resolved so we will all know you have been helped.
FAQ on the correct forum http://forums.asp.net/p/1337412/2699239.aspx#2699239
mcp111
Participant
835 Points
272 Posts
Re: Converting HTML RichText to RTF & Store into mssql 2005 Database
Jun 09, 2008 04:23 PM|LINK
Partha Mandayam
Application Developer
University Hospitals
Consulting Expert at Zintro
www.zintro.com/expert/mcp111
TATWORTH
All-Star
72415 Points
14017 Posts
MVP
Re: Converting HTML RichText to RTF & Store into mssql 2005 Database
Jun 10, 2008 11:08 AM|LINK
You could also try contact@prosdk.com - that is the contact email address for his consultancy company.
This earns you a point and marks your thread as Resolved so we will all know you have been helped.
FAQ on the correct forum http://forums.asp.net/p/1337412/2699239.aspx#2699239
TATWORTH
All-Star
72415 Points
14017 Posts
MVP
Re: Converting HTML RichText to RTF & Store into mssql 2005 Database
Jun 10, 2008 03:02 PM|LINK
On http://www.codeproject.com/KB/HTML/XHTML2RTF.aspx?msg=2590465#xx2590465xx
Emmaneul Kautman said:
Yes. this is 100% freeware - but I have no spare time to enhance it, sorry!
Feel free to modify/improve it. Please keep it free, and please keep me posted.
Regards,
E.
This earns you a point and marks your thread as Resolved so we will all know you have been helped.
FAQ on the correct forum http://forums.asp.net/p/1337412/2699239.aspx#2699239
chankl78
Member
337 Points
95 Posts
Re: Converting HTML RichText to RTF & Store into mssql 2005 Database
Jun 10, 2008 04:19 PM|LINK
Thank you so much for your help.
So now, we can create a project in codeplex?
Thanks.
TATWORTH
All-Star
72415 Points
14017 Posts
MVP
Re: Converting HTML RichText to RTF & Store into mssql 2005 Database
Jun 10, 2008 05:35 PM|LINK
>So now, we can create a project in codeplex?
Yes! Please add my TATWORTH account in as an administrator. As soon as I can download the project, I will set up a solution with some VB.NET unit tests. Your code to write to your SQL Server database will have to remain outside the solution.
This earns you a point and marks your thread as Resolved so we will all know you have been helped.
FAQ on the correct forum http://forums.asp.net/p/1337412/2699239.aspx#2699239
chankl78
Member
337 Points
95 Posts
Re: Converting HTML RichText to RTF & Store into mssql 2005 Database
Jun 10, 2008 06:01 PM|LINK
Hi,
I have created an project in codeplex http://www.codeplex.com/HTML2RTF.
I have put you as administrator / coordinator.
I had also private message mcp111 about it. Now, I am waiting for his response.
Smile
Chan Kuan Leang
TATWORTH
All-Star
72415 Points
14017 Posts
MVP
Re: Converting HTML RichText to RTF & Store into mssql 2005 Database
Jun 10, 2008 08:07 PM|LINK
You will need to choose a licence - I suggest the LGPL one as it allows commercial use while keeping the code free.
This earns you a point and marks your thread as Resolved so we will all know you have been helped.
FAQ on the correct forum http://forums.asp.net/p/1337412/2699239.aspx#2699239