我试图将视频上传到Wordpress.using以下方法iframe标签未显示C#
string expression = videoData.VideoTitle;
string str7 = videoData.VideoTitle;
WebClient client = new WebClient();
client.Headers.Add("Content-Type", "application/x-www-form-urlencoded");
string s = "security_code=JGZpbGVu&post_content=<iframe width='480' height='390' src='http://www.youtube.com/embed/XkIdmC8MlkI' frameborder='0' allowfullscreen></iframe>"
+ "&post_title=" + expression + "&post_category="
+ "&post_category=" + category + "&category=" + category + "&post_name=" + str7 + "&post_date=" + DATE_STRING;
byte[] bytes = Encoding.ASCII.GetBytes(s);
byte[] buffer2 = client.UploadData(uploadPath, "POST", bytes);
string str8 = Encoding.ASCII.GetString(buffer2).ToString();
它的工作原理,一切都贴出但在标签的东西没有得到贴我尝试了一些夫妇的事情什么结果out是它有标签问题。 当我删除iframetag的<它显示,但直到url和之后,一切都消失了。 这里是不执行以及
"security_code=JGZpbGVu&post_content=test iframe width='480' height='390' src='http://www.youtube.com/embed/XkIdmC8MlkI' frameborder='0' allowfullscreen></iframe>&post_title=How to build, upgrade, or repair, your own PC Computer&post_category=&post_category=asd&category=asd&post_name=How to build, upgrade, or repair, your own PC Computer&post_date=2011-05-11 00:00:00"
任何想法的东西有什么不好?
我们可以看到,当这贴_is_生成HTML是什么? – Chad 2011-05-10 19:19:34
Html在字符串s? – 2011-05-10 19:24:11
@Afnan就像你打这个电话后,访问你的Wordpress驱动的网站,你看到新帖子是正确的?复制该页面的HTML(最好只是有问题的部分)并发布给我们看。 – Chad 2011-05-10 19:26:24