Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

The security validation for this page is invalid

  Asked By: Judith    Date: Dec 08    Category: Sharepoint    Views: 1278

I am learning MS Sharepoint 2003. I am trying to run a sample in
sharepoint SDK which is for creating a new site. Fillowing is the
code for that->
SPWeb mySite = SPControl.GetContextWeb(Context);
SPWebCollection subSites = mySite.Webs;
string currentTemplate = mySite.WebTemplate;

string siteUrl = TextBox1.Text.ToString();
string siteTitle = TextBox2.Text.ToString();
string siteDescription = TextBox3.Text.ToString();

subSites.Add(siteUrl, siteTitle, siteDescription, 1033,
currentTemplate, true, false);

But when I run it, I keep getting this error->
"The security validation for this page is invalid. Click Back in your
Web browser, refresh the page, and try your operation again. "

Hitting browser's back button or refresh does not help. I also tried
the AllowUnsafeUpdate = true but still getting the error.
Some please help me sort out what is the problem.



No Answers Found. Be the First, To Post Answer.

Didn't find what you were looking for? Find more on The security validation for this page is invalid Or get search suggestion and latest updates.