本文整理汇总了C#中Util.SaveUrlAccountIdentifier方法的典型用法代码示例。如果您正苦于以下问题:C# Util.SaveUrlAccountIdentifier方法的具体用法?C# Util.SaveUrlAccountIdentifier怎么用?C# Util.SaveUrlAccountIdentifier使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Util
的用法示例。
在下文中一共展示了Util.SaveUrlAccountIdentifier方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Save_Click
protected void Save_Click(object sender, EventArgs e)
{
Util util = new Util();
Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
if (util.CheckSessionTimeout(State, Response, "../../Default.aspx")) return;
string name = UrlAccountIdentifier.Value.Trim();
if (name.Length == 0)
{
Message.Text = "Enter Account Identifier Name";
return;
}
if (!IsStringAlphaNumericPeriod(name) || name == ".")
{
Message.Text = "Domain Name should only use alphanumeric characters or '.'";
return;
}
if (util.DoesUrlAccountIdentifierExist((Hashtable)HttpRuntime.Cache[Session.SessionID], name))
Message.Text = "Account Identifier " + name + " is not Available.";
else
{
UrlAccountIdentifier.Value = name;
util.SaveUrlAccountIdentifier((Hashtable)HttpRuntime.Cache[Session.SessionID], name);
State["UrlAccountIdentifier"] = name;
Message.Text = "Account Identifier " + name + " has been saved. ";
}
}
示例2: SaveUrlAccountIdentifier_Click
protected void SaveUrlAccountIdentifier_Click(object sender, EventArgs e)
{
Util util = new Util();
Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
if (util.CheckSessionTimeout(State, Response, "Default.aspx")) return;
util.SaveUrlAccountIdentifier(State, UrlAccountIdentifier.Text.Trim());
DisplayModeValue.Text = "PreviewMode";
DisplayMode_Click(null, null);
}