I created a custom app page with two user controls:
asp:TextBox ID="SiteTitle" runat="server" and
asp:Button ID="UpdateSubmit" runat="server" Text="Update"
The goal is to have the same behavior as the _layouts/prjsetng.aspx page
So checking the current Title, change it and update it.
For some reason the below code is not updating the title. (Rights are ok running this as site col admin)
Code behind:
protected void Page_Load(object sender, EventArgs e) {
string Title = SPContext.Current.Web.Title;
SiteTitle.Text = Title;
UpdateSubmit.Click += new EventHandler(UpdateSubmitButton_Click); }
private void UpdateSubmitButton_Click(object sender, EventArgs e)
{
SPWeb oweb = SPContext.Current.Web;
oweb.Title = SiteTitle.Text.ToString();
oweb.Update();
}