本文整理汇总了C#中DotNetNuke.UI.Modules.ModuleInstanceContext.NavigateUrl方法的典型用法代码示例。如果您正苦于以下问题:C# ModuleInstanceContext.NavigateUrl方法的具体用法?C# ModuleInstanceContext.NavigateUrl怎么用?C# ModuleInstanceContext.NavigateUrl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DotNetNuke.UI.Modules.ModuleInstanceContext
的用法示例。
在下文中一共展示了ModuleInstanceContext.NavigateUrl方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ViewUserQuestionsSorted
public static string ViewUserQuestionsSorted(ModuleInstanceContext modContext, int currentUserID, string sortBy)
{
return modContext.NavigateUrl(modContext.TabId, "", false, "view=" + Constants.PageScope.Browse.ToString().ToLower(), "type=questions", "user=" + currentUserID, "sort=" + sortBy);
}
示例2: InstallURL
public static string InstallURL(int tabId, string returnUrl, string type, string package)
{
var parameters = new string[4];
parameters[0] = "rtab=" + tabId;
if (!string.IsNullOrEmpty(returnUrl))
{
parameters[1] = "returnUrl=" + returnUrl;
}
if (!string.IsNullOrEmpty(type))
{
parameters[2] = "ptype=" + type;
}
if (!string.IsNullOrEmpty(package))
{
parameters[3] = "package=" + package;
}
var context = new ModuleInstanceContext();
return context.NavigateUrl(tabId, "Install", false, parameters);
}
示例3: ViewUserAnswers
public static string ViewUserAnswers(ModuleInstanceContext modContext, int currentUserID)
{
return modContext.NavigateUrl(modContext.TabId, "", false, "view=" + Constants.PageScope.Browse.ToString().ToLower(), "type=answers", "user=" + currentUserID);
}
示例4: ViewBadge
public static string ViewBadge(ModuleInstanceContext modContext, string name, int id)
{
return modContext.NavigateUrl(modContext.TabId, "", false, "view=" + Constants.PageScope.Badge.ToString().ToLower(), "name=" + id, name);
}
示例5: ViewFilteredBadges
public static string ViewFilteredBadges(ModuleInstanceContext modContext, string filter)
{
return modContext.NavigateUrl(modContext.TabId, "", false, "view=" + Constants.PageScope.Badges.ToString().ToLower(), "filter=" + filter);
}
示例6: EditPost
public static string EditPost(ModuleInstanceContext modContext, int postId)
{
return modContext.NavigateUrl(modContext.TabId, "", false, "view=" + Constants.PageScope.EditPost.ToString().ToLower(), "id=" + postId);
}
示例7: KeywordSearch
public static string KeywordSearch(ModuleInstanceContext modContext, string searchString)
{
return modContext.NavigateUrl(modContext.TabId, "", false, "view=" + Constants.PageScope.Browse.ToString().ToLower(), "keyword=" + HttpUtility.UrlEncode(searchString));
}
示例8: ViewQuestionsSorted
public static string ViewQuestionsSorted(ModuleInstanceContext modContext, string sortBy, bool unanswered, int page)
{
if (unanswered)
{
return ViewUnansweredQuestions(modContext, page, sortBy);
}
return page > 1 ? modContext.NavigateUrl(modContext.TabId, "", false, "view=" + Constants.PageScope.Browse.ToString().ToLower(), "type=questions", "sort=" + sortBy, "page=" + page) : modContext.NavigateUrl(modContext.TabId, "", false, "view=" + Constants.PageScope.Browse.ToString().ToLower(), "type=questions", "sort=" + sortBy);
}
示例9: ViewTaggedQuestionsSorted
public static string ViewTaggedQuestionsSorted(ModuleInstanceContext modContext, string termName, string sortBy)
{
return modContext.NavigateUrl(modContext.TabId, "", false, "view=" + Constants.PageScope.Browse.ToString().ToLower(), "tag=" + HttpUtility.UrlEncode(termName), "sort=" + sortBy);
}
示例10: ViewQuestionSorted
public static string ViewQuestionSorted(ModuleInstanceContext modContext, int questionId, string sortBy)
{
return modContext.NavigateUrl(modContext.TabId, "", false, "view=" + Constants.PageScope.Question.ToString().ToLower(), "id=" + questionId, "sort=" + sortBy);
}
示例11: ViewQuestionsPaged
public static string ViewQuestionsPaged(ModuleInstanceContext modContext, int page)
{
return page > 1 ? modContext.NavigateUrl(modContext.TabId, "", false, "view=" + Constants.PageScope.Browse.ToString().ToLower(), "type=questions", "page=" + page) : ViewQuestions(modContext);
}
示例12: ViewQuestions
public static string ViewQuestions(ModuleInstanceContext modContext)
{
return modContext.NavigateUrl(modContext.TabId, "", false, "view=" + Constants.PageScope.Browse.ToString().ToLower(), "type=questions");
}
示例13: UnInstallURL
/// -----------------------------------------------------------------------------
/// <summary>
/// The UnInstallURL method provides a utility method to build the correct url
/// to uninstall a package (and return to where you came from)
/// </summary>
/// <param name="tabId">The id of the tab you are on</param>
/// <param name="packageId">The id of the package you are uninstalling</param>
/// <returns>The localized string</returns>
/// <history>
/// [cnurse] 07/31/2007 created
/// [vnguyen] 05/24/2011 updated: calls NavigateUrl of Module Context to handle popups
/// </history>
/// -----------------------------------------------------------------------------
public static string UnInstallURL(int tabId, int packageId)
{
var parameters = new string[2];
parameters[0] = "rtab=" + tabId;
parameters[1] = "packageId=" + packageId;
var context = new ModuleInstanceContext();
return context.NavigateUrl(tabId, "UnInstall", true, parameters);
}
示例14: PackageWriterURL
/// -----------------------------------------------------------------------------
/// <summary>
/// The PackageWriterURL method provides a utility method to build the correct url
/// to create a package (and return to where you came from)
/// </summary>
/// <param name="context">The ModuleContext of the module</param>
/// <param name="packageId">The id of the package you are packaging</param>
/// <returns>The localized string</returns>
/// <history>
/// [cnurse] 01/31/2008 created
/// [vnguyen] 05/24/2011 updated: calls NavigateUrl of Module Context to handle popups
/// </history>
/// -----------------------------------------------------------------------------
public static string PackageWriterURL(ModuleInstanceContext context, int packageId)
{
var parameters = new string[3];
parameters[0] = "rtab=" + context.TabId;
parameters[1] = "packageId=" + packageId;
parameters[2] = "mid=" + context.ModuleId;
return context.NavigateUrl(context.TabId, "PackageWriter", true, parameters);
}
示例15: ViewUserSubscriptions
public static string ViewUserSubscriptions(ModuleInstanceContext modContext)
{
return modContext.NavigateUrl(modContext.TabId, "", false, "view=" + Constants.PageScope.Subscriptions.ToString().ToLower(), "");
}