Quote:public string PreparePOSTForm(System.Web.UI.Page myPage, string formID, string url, System.Collections.Hashtable data) // post form { //Set a name for the form //string formID = "PostForm"; //Build the form using the specified data to be posted. StringBuilder strForm = new StringBuilder(); strForm.Append(""); foreach (System.Collections.DictionaryEntry key in data) { strForm.Append(""); } strForm.Append(""); //Build the JavaScript which will do the Posting operation. StringBuilder strScript = new StringBuilder(); strScript.Append(""); strScript.Append("var v" + formID + " = document." + formID + ";"); strScript.Append("v" + formID + ".submit();"); strScript.Append(""); //Return the form and the script concatenated. //(The order is important, Form then JavaScript) myPage.Controls.Add(new LiteralControl(strForm.ToString() + strScript.ToString())); return strForm.ToString() + strScript.ToString(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)