我正在尝试输出x
以下请求中的值:http://localhost:4827/Default.aspx?x=123123
我根本没有输出。这是我的代码:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net.Mail;
using MPads.Common;
using MPads.WebPatientPortal.Interfaces;
using MPads.WebPatientPortal.Presenters;
using MPads.BusinessLogic.Interfaces;
using MPads.Components.Interfaces;
using MPads.DataAccess;
using MPads.DataAccess.Interfaces;
using System.Text;
using System.Diagnostics;
namespace MPads.WebPatientPortal
{
public partial class Default : System.Web.UI.Page, IDefault
{
private DefaultPresenter _presenter;
protected void Page_Load(object sender, EventArgs e)
{
Response.Cache.SetCacheability(HttpCacheability.NoCache);
_presenter = new DefaultPresenter();
var fields = Request.QueryString;
if (fields.Count > 0)
{
var x = Utilities.GetNvpValue(fields, "x").ToString();
Trace.Write(x);
}
}
public void loadAjaxContent(string content)
{
Page.RegisterStartupScript("myScript", " <script type=\"text/javascript\"> loadAjaxContent('" + content + "','POST',null); </script>");
}
public void DisplayMessage(string message)
{
}
}
}