本文整理汇总了C#中XhtmlMobileTextWriter.WriteEncodedUrl方法的典型用法代码示例。如果您正苦于以下问题:C# XhtmlMobileTextWriter.WriteEncodedUrl方法的具体用法?C# XhtmlMobileTextWriter.WriteEncodedUrl怎么用?C# XhtmlMobileTextWriter.WriteEncodedUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XhtmlMobileTextWriter
的用法示例。
在下文中一共展示了XhtmlMobileTextWriter.WriteEncodedUrl方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RenderPostbackUrl
private void RenderPostbackUrl(XhtmlMobileTextWriter writer) {
if ((String)Device["requiresAbsolutePostbackUrl"] == "true") {
RenderAbsolutePostbackUrl (writer);
return;
}
if (Control.Action.Length > 0) {
String url = Control.ResolveUrl(PreprocessQueryString(Control.Action));
writer.Write(url);
}
else {
writer.WriteEncodedUrl(Page.RelativeFilePath);
}
}
示例2: RenderAbsolutePostbackUrl
private void RenderAbsolutePostbackUrl(XhtmlMobileTextWriter writer) {
String url = PreprocessQueryString(Control.Action);
if (url.Length > 0) {
// Not only do we need to resolve the URL, but we need to make it absolute.
url = Page.MakePathAbsolute(Control.ResolveUrl(url));
writer.Write(url);
}
else {
writer.WriteEncodedUrl(Page.AbsoluteFilePath);
}
}
示例3: RenderUrlPostBackEvent
/// <include file='doc\XhtmlBasicPageAdapter.uex' path='docs/doc[@for="XhtmlPageAdapter.RenderUrlPostBackEvent"]/*' />
public virtual void RenderUrlPostBackEvent (XhtmlMobileTextWriter writer,
String target,
String argument) {
String amp = (String)Device[XhtmlConstants.SupportsUrlAttributeEncoding] == "false" ? "&" : "&";
if ((String)Device["requiresAbsolutePostbackUrl"] == "true") {
writer.WriteEncodedUrl(Page.AbsoluteFilePath);
}
else {
writer.WriteEncodedUrl(Page.RelativeFilePath);
}
writer.Write ("?");
// Encode ViewStateID=.....&__ET=controlid&__EA=value in URL
// Note: the encoding needs to be agreed with the page
// adapter which handles the post back info
String pageState = Page.ClientViewState;
if (pageState != null) {
writer.WriteUrlParameter (MobilePage.ViewStateID, pageState);
writer.Write (amp);
}
writer.WriteUrlParameter (EventSourceKey, target);
writer.Write (amp);
writer.WriteUrlParameter (EventArgumentKey, argument);
RenderHiddenVariablesInUrl (writer);
// Unique file path suffix is used for identify if query
// string text is present. Corresponding code needs to agree
// on this. Even if the query string is empty, we still need
// to output the suffix to indicate this. (this corresponds
// to the code that handles the postback)
writer.Write(amp);
writer.Write(Constants.UniqueFilePathSuffixVariable);
String queryStringText = PreprocessQueryString(Page.QueryStringText);
if (queryStringText != null && queryStringText.Length > 0) {
writer.Write (amp);
if ((String)Device[XhtmlConstants.SupportsUrlAttributeEncoding] != "false") {
writer.WriteEncodedAttributeValue(queryStringText);
}
else {
writer.Write (queryStringText);
}
}
}