Hi t01714500930,
Check this example. Now please take its reference and correct your code.
HTML
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
<script type="text/javascript">
function GenerateLinks(message) {
var urlRegex = /(((https?:\/\/)|(www\.))[^\s]+)/g;
return message.replace(urlRegex, function (url) {
var hyperlink = url;
if (!hyperlink.match('^https?:\/\/')) {
hyperlink = 'http://' + hyperlink;
}
return '<a href="' + hyperlink + '" target="_blank" >' + url + '</a>'
});
}
window.onload = function () {
document.getElementById('Label1').innerHTML = GenerateLinks(document.getElementById('Label1').innerHTML);
};
</script>
Code
protected void Page_Load(object sender, EventArgs e)
{
Label1.Text = "I love asp county ilove my http://www.aspforums.net this is very good site of world my http://www.aspforums.net/ im allway visit https://www.aspforums.net/Threads/";
}
Screenshot