solution for first question
what ever the html tag it is, it will be removed from the string using this function
take this
<div> Demo Patient </div>
in one string variable like this
string name="<div> Demo Patient </div>";
//add this function in your page
public string StripTagsCharArray(string source)
{
char[] array = new char[source.Length];
int arrayIndex = 0;
bool inside = false;
for (int i = 0; i < source.Length; i++)
{
char let = source[i];
if (let == '<')
{
inside = true;
continue;
}
if (let == '>')
{
inside = false;
continue;
}
if (!inside)
{
array[arrayIndex] = let;
arrayIndex++;
}
}
string data = new string(array, 0, arrayIndex);
return data;
}
//call the function like this
name=StripTagsCharArray(name);
and finally
output is :Demo Patient