zoukankan      html  css  js  c++  java
  • aspx与silverlight的传参问题

    ContactShow.aspx:

    View Code
     1 <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ContactShow.aspx.cs" Inherits="Strongsoft.FloodControl.Web.Contact.ContactShow" %>
     2 <%@ Register Assembly="System.Web.Silverlight" Namespace="System.Web.UI.SilverlightControls" TagPrefix="asp" %>
     3 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     4 
     5 <html xmlns="http://www.w3.org/1999/xhtml">
     6 <head runat="server">
     7     <title>联系人详细信息</title>
     8 </head>
     9 <body>
    10     <form id="form1" runat="server">
    11         <asp:Silverlight id="modContact" runat="server" 
    12         Source="~/ClientBin/Strongsoft.Sub.Contact.xap" Width="100%" Height="700px" 
    13         MinimumVersion="3.0" />
    14     </form>
    15 </body>
    16 </html>

    ContactShow.aspx.cs:

    View Code
     1 using System;
     2 using System.Collections.Generic;
     3 using System.Linq;
     4 using System.Web;
     5 using System.Web.UI;
     6 using System.Web.UI.WebControls;
     7 
     8 namespace Strongsoft.FloodControl.Web.Contact
     9 {
    10     public partial class ContactShow : System.Web.UI.Page
    11     {
    12         protected void Page_Load(object sender, EventArgs e)
    13         {
    14             string type = Request["type"] == null ? string.Empty : Request["type"].ToString();
    15             string id = Request["id"] == null ? string.Empty : Request["id"].ToString();
    16             modContact.InitParameters = "type=" + type + ",id=" + id + ",init=Show";
    17         }
    18     }
    19 }

    App.xaml.cs:

    View Code
     1  private void Application_Startup(object sender, StartupEventArgs e)
     2         {
     3             if (e.InitParams["init"] == "Show") //调用通用显示控件
     4             {
     5                 this.RootVisual = new ContactShow(e.InitParams["id"], e.initParams["type"]);
     6             }
     7             else //正常启动通讯录
     8             {
     9                  ...
    10             }
    11         }
  • 相关阅读:
    (2)远程管理线上服务之sshd服务
    (1)远程管理线上服务之sshd服务
    自建yum仓库
    CentOS7安装MySQL报错Failed to start mysqld.service: Unit not found解决办法
    ssh(Spring,Struts2,Hibernate)注解版整合
    Hibernate关联映射(多对一,一对多, 一些属性(Cascade,inverse,order by))
    HQL查询(分页查询,动态sql查询,参数查询)
    初识Oracle
    ajax获取属性值
    关于SpringMvc返回值类型 Object使用
  • 原文地址:https://www.cnblogs.com/wanghafan/p/2456505.html
Copyright © 2011-2022 走看看