Hello,
I was wondering how I could access the html for the MainBody property.
I am basically trying to find part of the code using regular expressions but when i use the CurrentPage["MainBody"].ToString(), I don't get the html code.
string strMainBody = CurrentPage["MainBody"].ToString();
string ImageRegEx = "";
Match m = Regex.Match(strMainBody, ImageRegEx);
Label1.Text = "Label" + m.ToString();
Thanks.
Victor
You need to access the MainBody property as a PropertyLongString i order to get hold of the HTML code.
PropertyLongString mainBody = (PropertyLongString)CurrentPage.Property["MainBody"];
string strMainBody = CurrentPage["MainBody"].ToString(); string ImageRegEx = ""; Match m = Regex.Match(strMainBody, ImageRegEx); Label1.Text = "Label" + m.ToString();
Thanks. Victor