易截截图软件、单文件、免安装、纯绿色、仅160KB

Silverlight应用程序中获取ASP.NET页面参数

方法一:使用InitParameters
传递参数页面:
        传递一个参数
string url = "index.aspx?UserID=" +userId;
//最大化       
string refUrl = "<Script>window.self.open('" + url + "', '', 'fullscreen=yes,scrollbar=no,toolbar=no,location=no,status=no, menubar=no, resizable=no', true);</script>";
        this.Response.Write(refUrl);
Silverlight Host 页面:
      string UserID= Request.QueryString["UserID"].ToString();
//将参数传到Silverlight  里
        this.Xaml1.InitParameters = String.Format("UserID={0}",UserID);
silverlight App.xaml.cs里
 private void Application_Startup(object sender, StartupEventArgs e)
        {
   // 获得参数         
   string  userId = e.InitParams["UserID"].ToString();
 
            this.RootVisual = new index();
        }
方法二 :使用System.Windows.Browser.HtmlPage.Document.QueryString
传递参数页面:
        传递一个参数
string url = "index.aspx?UserID=" +userId;
//最大化       
string refUrl = "<Script>window.self.open('" + url + "', '', 'fullscreen=yes,scrollbar=no,toolbar=no,location=no,status=no, menubar=no, resizable=no', true);</script>";
        this.Response.Write(refUrl);
Silverlight Host 页面:

  
silverlight 程序里
IDictionary<string, string> paras = System.Windows.Browser.HtmlPage.Document.QueryString;
            string UserID = paras["UserID"];
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/YanRocky/archive/2009/06/11/4


相关文档:

asp.net图片验证码

asp.net系统,在登录或注册时常提供数字或字符混合的验证码,这里介绍如何操作。
1,Default 页面
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
  & ......

ASP.NET Login控件使用方法及须知(图)

ASP.NET登陆控件比较多,封装了大部分WEB应用中要实现系统登陆的系列功能,涉及到很多方面。众多 ASP.NET 登录控件一起为 ASP.NET Web 应用程序提供可靠的无需编程的登录解决方案。默认情况下,登录控件与 ASP.NET 成员资格和 Forms 身份验证集成,以帮助使网站的用户身份验证过程自动化。默认情况下,ASP.NET 登录控件以纯 ......

asp.net后台验证类

/// <summary>
    /// 提供经常需要使用的一些验证逻辑。 比如 邮箱是否合法
    /// </summary>
    public class Validator
    {
        /// <summary>
     &nbs ......

asp.net TextBox只读时不能通过后台赋值取值解决办法


给页面的TextBox设置ReadOnly="True"时,在后台代码中不能赋值取值,下边几种方法可以避免:
1、不设置ReadOnly,设置onfocus=this.blur()
C#代码
<asp:TextBox ID="TextBox1" runat="server" onfocus=this.blur()></asp:TextBox>  
<asp:TextBox ID="TextBox1" runat="serve ......

重置ASP.NET membership加密后的密码

这里我只摘取了原文的Code以供潜心研究.using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Configuration;
using System.Data.SqlClient;
using System.Web.Security;
using System.Data;
public ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号