TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Nelson
NA
6
0
How to change the master page from a winform?
Nov 9 2009 6:13 PM
Hi there,
I am trying to change the master page of a webapp in SS I tried this code:
public void mSetMasterPage(string sUrlSite, string sWebName)
{
using (SPSite oSiteCollection = new SPSite(sUrlSite))
{
SPWeb myWebSite = oSiteCollection.OpenWeb(sWebName);
myWebSite.MasterUrl = "/_layouts/BlackBand.Master";
myWebSite.CustomMasterUrl = "/_layouts/BlackBand.Master";
myWebSite.Update();
}
}
And in theory this works, but when I open the webapp it only says "Error" and I supose that I am missingo something, but I do not know what, could anyone give me a hand???
Thank you very much for any answer,
Nelson
Reply
Answers (
4
)
Windows APp with 2 browsers inside to browse and control buttons to autologin,autocalculate, autopress, auto collect STATS
Game Movement -can't get a diagonal to work -can't make movements smoother