我試圖將視頻上傳到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