Skip to content
July 16, 2009 / kiranpatils

How to use asp:table in Mobile Page


How to use asp:table in Mobile Page?

Or if you got an error

‘asp:Table’ cannot be a top-level form element.

Then solution is here:


<%@ Page Language="C#" AutoEventWireup="true" Inherits="Mobile2.Default1" Codebehind="Default1.aspx.cs" %>

<%@ Register TagPrefix="mobile" Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %>
<html xmlns="" >


<mobile:Form id="Form1" runat="server">
<mobile:panel id="pnlMobile" runat="server">
<asp:Table id ="mainTable" runat="server">
<mobile:Label ID="Label1" runat="server">Demo</mobile:Label>
<mobile:Label ID="Label2" runat="server">Demo</mobile:Label>

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: