Msdn:Http://social.microsoft.com/Forums/zh-CN/partnercndevsharepoint/thread/9d9a6bc4-2dfe-4d98-9c3f-fe33dcd6d18d
Hey, everybody!
There is"Launch blog program to post"Button can directly open the word post! If it is opened for the first time, the following registration will pop up!
View the source file. It calls function newblogpostonclient (strproviderid, strblogurl, strblogname) in init. js );
Protected void btntestblog_click (Object sender, eventargs e) {// This sentence is copied from SharePoint // javascript: newblogpostonclient (% messages % 27, % 20% 27 http: // jianghao: 9000/personal/hao_jiang/blog % 27, % 20% 27e861d78e-6e8d-4afb-93b4-89416bc4c071 # e819785b-954f-41a9-9bbf-e0f6df91b76a ') "/** first parameter: fixed parameter * second parameter: blog address * third parameter: blog ID + "#" + guid * // dwn ("str1 =====" + server. urldecode ("% 27"); // dwn ("str2 ======" + server. htmldecode ("% 27"); // dwn (""); Is response. write (""); Using (spsite site = new spsite ("http: // jianghao: 9000/personal/hao_jiang") {using (spweb rootweb = site. rootweb) {spweb web = rootweb. webs ["blog"]; dwn ("ID =" + web. ID); dwn ("url =" + web. URL); dwn ("serverrelativeurl =" + web. serverrelativeurl); dwn ("currencylocaleid =" + web. currencylocaleid); dwn ("parentwebid =" + web. parentwebid); string urlstr = "javascript: newblogpostonclient ('18faf3ff-2cdd-4f17-9b7c-b11d0127f405 ',"; urlstr + = "'" + web. URL + "',"; urlstr + = "'" + web. ID + "#2cefe993-04d1-4e4e-80b2-04c47bcbbba6" + "')"; // There is an open Word hladmlnk5.navigateurl = urlstr;/** the problem now is that word can open post and publish! That is, if the guid behind the # sign that you splice is different from the * In Sharepoint, the registration window will pop up each time, and the SharePoint will only pop up once! * What does the guid after # sign mean? How can I obtain it? * Thank you * // * system. collections. hashtable ht = web. allproperties; foreach (VAR Item1 in HT. keys) {// dwn (Item1 + "===>" + HT [Item1]);} Microsoft. sharepoint. utilities. sppropertybag bag = web. properties; foreach (VAR item in bag. keys) {// dwn (item + "==>" + bag [item. tostring ()]);} **/}
before you raise this question! Under my blog sites on different SharePoint sites, " launch blog program to post " copy the called script to notepad!
I found that the guid behind the # symbol is different!
click SharePoint " launch blog program to post ", the registration box appears only once! But clicking it later will not pop up! I think whether the guid after # is the record is the first pop-up registration box!
In Your Code , as long as the guid after # is not the same as the guid after # In Sharepoint, although this is the first time, the registration box will pop up later!
I copied the guid behind # In Sharepoint to the guid behind # In my code, the effect is the same as that in SharePoint! However, the Program is dynamic