Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 21st, 2007, 10:54 AM
Registered User
 
Join Date: Mar 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default moble control code file

Hi im just writing a mobile web form and wanted to put my c# code in a .cs file. I tried this code
***********************************

<%@ Page Inherits="System.Web.UI.MobileControls.MobilePage" Language="C#" CodeFile="~/Default.aspx.cs"%>

*************************************

I get these errors

************************************

1) Error 1 Validation (XHTML 1.0 Transitional): Element 'head' occurs too few times. \\sideshowbob1\students\s02090619\My Documents\Visual Studio 2005\WebSites\mobile\mobile_location\Default.aspx 6 2 \\sideshowbob1\students\...\mobile_location
************************************
2)

Warning 8 The type 'System.Web.UI.MobileControls.MobilePage' in 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Tem porary ASP.NET Files\mobile_location\1131b266\4059c4da\App_Web_de fault.aspx.cdcab7d2.2efiscjz.0.cs' conflicts with the imported type 'System.Web.UI.MobileControls.MobilePage' in 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2. 0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll'. Using the one in 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Tem porary ASP.NET Files\mobile_location\1131b266\4059c4da\App_Web_de fault.aspx.cdcab7d2.2efiscjz.0.cs'. c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temp orary ASP.NET Files\mobile_location\1131b266\4059c4da\App_Web_de fault.aspx.cdcab7d2.2efiscjz.0.cs 156
********************************************

If i remove the CodeFile="~/Default.aspx.cs part of the code the errors dissapear.

Is it possible to use a cs file for mobile controls? Or do I have to use script tags?

Many thanks

CRS






Similar Threads
Thread Thread Starter Forum Replies Last Post
user control code chroniclemaster1 ASP.NET 2.0 Professional 11 September 25th, 2008 03:53 PM
VB: .Exe file, serial code and activation code ivanlaw Pro VB 6 8 July 6th, 2007 05:44 AM
transfearing code to aspx file from vb file alyeng2000 ASP.NET 1.0 and 1.1 Professional 1 December 15th, 2003 11:12 AM
User Control / Code-behind ViagraFalls ASP.NET 1.0 and 1.1 Basics 3 November 1st, 2003 09:18 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.