从文本值中删除标签asp.net [英] remove tag from text values asp.net

查看:96
本文介绍了从文本值中删除标签asp.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个标签说lblMsg,它从数据库接收文本

现在将此标签中的文本设置为"

你好

i have a label say lblMsg, which receives text from database

Now asume text in this label as "

hello

你好


,文本出现在两个不同的行中 标记,所以我想删除


tag ,so i want to remove the first occurance of

标记的第一次出现,我该如何在C#中执行此操作?

tags how can i do this in C#?

推荐答案

请检查页面视图的源代码,然后首先找出创建了什么标记,然后可以使用不同的技术将其删除,例如REGEX,string.Replace()等.

希望这会有所帮助....
Please check the page view source and first find out what tag is created, then you can use the different techniques to remove it, examples are REGEX, string.Replace() etc.

Hope this helps....


这篇关于从文本值中删除标签asp.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆