Serious Newbie that would like some help

K

Kelly Brady

I'm one serious newbie, and I'm trying to display some data into a mobile
webform. I am using WebMatrix and here is what I have so far but I keep
getting this error. Like I said I'm not even sure what I am doing is correct
or not.

CODE:
<%@ Page Inherits="Microsoft.Saturn.Framework.Mobile.UI.MobilePage,
Microsoft.Saturn.Framework.Mobile, Version=0.5.464.0, Culture=neutral,
PublicKeyToken=6f763c9966660626" Language="VB" %>
<%@ Register TagPrefix="Mobile" Namespace="System.Web.UI.MobileControls"
Assembly="System.Web.Mobile" %>
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Data.SqlClient" %>
<script runat="server">

Dim sEmps as String
Dim strConn as string =
"server=TOWER\TOWER;uid=Northwind_reader;pwd=reader;database=NorthWind"

Sub Page_Load(Source as Object, E as EventArgs)
Dim MySQL as string = "Select Employees.FirstName,
Employees.LastName, Employees.Title, " & _
"Employees.BirthDate from Employees"
Dim MyConn as New SQLConnection(strConn)
Dim ds as DataSet=New DataSet()
Dim Cmd as New SQLDataAdapter(MySQL,MyConn)
Cmd.Fill(ds,"Employees")

'then, here we assign the data to a DataGrid, much like the way
we did in the example for the DataList:
MyDataGrid.Datasource=ds.Tables("Employees").DefaultView
MyDataGrid.DataBind()
End Sub

</script>
<mobile:Form id="Form1" runat="server">
<div align="center">
<table>
<tbody>
<tr>
<td valign="top" align="middle" colspan="2">
<hr />
<b><i><font color="#0000ff">Using a
DataGid:</font></i></b>
<mobile:Datagrid id="MyDataGrid" runat="server"
Headerstyle-Font-Bold="true" BackColor="#8080FF"
AlternatingItemStyle-BackColor="#CFCFCF"
AlternatingItemStyle-Font-Name="Arial" AlternatingItemStyle-Font-Size="10"
BorderColor="Black" GridLines="Both" cellpadding="0" cellspacing="0"
Headerstyle-BackColor="#8080C0" Headerstyle-Font-Name="Arial"
Headerstyle-Font-Size="12" Font-Name="Arial"
Font-Size="10"></mobile:Datagrid>
</td>
</tr>
</tbody>
</table>
</div>
</mobile:Form>



ERROR:
Parser Error
Description: An error occurred during the parsing of a resource required to
service this request. Please review the following specific parse error
details and modify your source file appropriately.

Parser Error Message: Could not load type
System.Web.UI.MobileControls.Datagrid from assembly System.Web.Mobile,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top