本文介绍了网址编码不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在页面加载时编码我的网址。它必须以页面加载时始终对页面进行编码的方式工作。但它不起作用,这个页面是一个独立的页面,所以没有链接重定向用户,但我需要让它为我的项目工作。



请帮助谢谢!



这是我的Page_Load代码

Hi, I wanted to encode my url on page load. It has to work in a way that the page will always be encoded on page load. But it is not working, this page is a standalone page so there are no link to redirect user but I need to get it working for my project.

Please help thanks!

This is my Page_Load code

protected void Page_Load(object sender, EventArgs e)
  {
      string destinationURL = "http://localhost:2094/PaymentSuccesful";

      string encodeURL = Server.UrlEncode(destinationURL);

      Response.Redirect(encodeURL);
  }

推荐答案


这篇关于网址编码不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-28 06:59
查看更多