[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.mobile

how to create a new mobilepage from a derived class

empires2

1/26/2005 3:59:00 AM

hi
I create a mobile page(named as "index.asp" and "index.aspx.cs") from a
derived class( named as "stdPage.cs"), but the mobile page can not display in
the VS.NET IDE at design time. How can this page be displayed in IDE at
design time.By the way, the appliation work well when I test it with
emulator.

Thanks

the code as follow

file: stdPage.cs

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.Mobile;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.MobileControls;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Configuration;
using System.IO;
namespace WAPApp.Component
{
public class stdPage:System.Web.UI.MobileControls.MobilePage
{
public stdPage()
{
//
// TODO: å?¨æ­¤å¤?æ·»å? æ??é? å?½æ?°é?»è¾?
//
}

//my code at here
}
}

file : index.asp
<%@ Register TagPrefix="mobile" Namespace="System.Web.UI.MobileControls"
Assembly="System.Web.Mobile" %>
<%@ Page language="c#" Codebehind="index.aspx.cs" Inherits="WAPApp.index"
AutoEventWireup="false" %>
<HEAD>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="C#" name="CODE_LANGUAGE">
<meta content="http://schemas.microsoft.com/Mobile/...
name="vs_targetSchema">
</HEAD>
<body Xmlns:mobile="http://schemas.microsoft.com/Mobile/WebForm...
<mobile:form id="IndexForm" runat="server">
<mobile:Label id="Label1" runat="server" Alignment="Center"
StyleReference="title">welcome</mobile:Label>
</mobile:form>
</body>

file: index.asp.cs
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.Mobile;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.MobileControls;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

using WAPApp.Component;

namespace WAPApp.
{
public class index : stdPage
{
protected System.Web.UI.MobileControls.Label Label1;
protected System.Web.UI.MobileControls.Form IndexForm;
private void Page_Load(object sender, System.EventArgs e)
{

#region Web çª?ä½?设计å?¨ç??æ?ç??代码
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: 该è°?ç?¨æ?¯ ASP.NET Web çª?ä½?设计å?¨æ??å¿?é??ç??ã??
//
InitializeComponent();
base.OnInit(e);
}

/// <summary>
/// 设计å?¨æ?¯æ?æ??é??ç??æ?¹æ³? - 不要使ç?¨ä»£ç ç¼?è¾?å?¨ä¿®æ?¹
/// æ­¤æ?¹æ³?ç??å??容ã??
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);

}
#endregion

}
}