I have a Link in Richtextbox and it works good but if I save that Richtextbox in to a file and then load it that link to be deleted and I just can see the text of that Link

How can i save richtextbox in a file or sql without lost links?

for example my Richtextbox have bottom text:

This is a link

But after save and load again file I just can see the text:

This is a link

this is my string value that I try to set in my Richtextbox with this code: richTextBox1.Rtf = str;

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Microsoft Sans Serif;}} \viewkind4\uc1\pard\f0\fs16 Link text\v #Hyperlink text\v0\par }

有帮助吗?

解决方案

you can sove this problem using link label:

Demo for Link label is here http://msdn.microsoft.com/en-gb/library/system.windows.forms.linklabel.link.aspx

you have to add linklabel into richtextbox & you have goto this link

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top