|
using System;
using System.Globalization;
using Mixba.BuilderEditor;
using System.Web;
namespace WebDataCatalog
{
public class Utils
{
static internal void SetBuilderEditorMode(HttpRequest request, BuilderEditor be, string masterPageUrl)
{
if (request.QueryString["Mode"]!=null && string.Compare(request.QueryString["Mode"], "Edit", true, CultureInfo.InvariantCulture)==0)
{
be.DefaultMode = BuilderEditorMode.Edit;
be.ShowEditButton = true;
be.AutoRedirectToMasterUrl = true;
be.MasterUrl = masterPageUrl;
}
else if (request.QueryString["Mode"]!=null && string.Compare(request.QueryString["Mode"], "Add", true, CultureInfo.InvariantCulture)==0)
{
be.DefaultMode = BuilderEditorMode.Add;
be.ShowNewButton = true;
be.AutoRedirectToMasterUrl = true;
be.MasterUrl = masterPageUrl;
}
else
be.DefaultMode = BuilderEditorMode.ReadOnly;
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.