My BlackBerry/ASP.Net Faculty Mobile Web Site
My latest experiment…. Take my BlackBerry… Write a Java App with a custom Icon to launch my mobile faculty web site (written in ASP.Net 3.5).
Background:
I am updating my GCC faculty web site to have a new mobile site using ASP.Net. In conjunction with this, I have also been working with Java on my BlackBerry Curve 8330. I decided I liked the way CNN, ESPN, NYT, etc, have created neat icons to launch their web pages. I wanted the same for my students and when the page for my faculty web site launches, I wanted the pages to be mobile and PC compatible. Below is how I did it…. ![]()
ASP.Net 3.5
I have had a lot of luck using ASP web pages on mobile devices. The IIS server converts most .Net controls into HTML will makes content very mobile compatible. In a previous post, I talked about a JavaScript-less quiz app I run over the Internet via my mobile phone browser that is also written in ASP.Net. Since JavaScript in mobile browsers is not universally supported, the ASP solution has some merit. The problem is that ASP.Net by default runs on an Microsoft IIS server instead of the standard Apache server. (Apache being the dominant Internet Server). I have heard .Net will run on an Apache Internet Server( and if anyone has experience with this, I would love to hear how successful it works). Below is the output of the opening screen that I created for my students at Glendale Community College. I will be added more as I go. This is the start of the project. The page is viewable on a mobile device or PC http://www.garymarrer.com/facsite/ It has some links and text. It does not have the ASP quiz page I created but you can look at that at http://www.garymarrer.com/aspnet/default.aspx I mention this because this quiz does not use JavaScript but instead is server based and html is all the mobile device gets from the server so it can run content that it might not otherwise be an option on a mobile device.
ASP.Net Code Sample
Master Page
<%@
Master
Language=”VB”
CodeFile=”FacultyMasterPage.master.vb”
Inherits=”FacultyMasterPage”
%>
<!DOCTYPE
html
PUBLIC
“-//W3C//DTD XHTML 1.0 Transitional//EN”
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html
xmlns=”http://www.w3.org/1999/xhtml”>
<link
href=”StyleSheet.css”
rel=”stylesheet”
type=”text/css”
/>
<head
runat=”server”>
<title>G Marrer Faculty Mobile Site</title>
<asp:ContentPlaceHolder
id=”head”
runat=”server”>
</asp:ContentPlaceHolder>
<style
type=”text/css”>
.style1
{
text-align: left;
}
.style2
{
color: #FF0000;
text-align: center;
}
.style3
{
color: #66CCFF;
}
.style4
{
color: #FFFF00;
}
</style>
</head>
<body>
<form
id=”form1″
runat=”server”>
<div
class=”style1″>
<div
class=”style1″>
<br
/>
<br
/>
<asp:Label
ID=”Label1″
runat=”server”
Text=”Gary Marrer – Faculty Mobile Site”
Font-Size=”Large”
Font-Bold=”True”></asp:Label>
<asp:Image
ID=”Image1″
runat=”server”
ImageUrl=”~/images/Profile.png”
ImageAlign=”AbsMiddle”
BorderStyle=”Groove”
/>
<br
/>
<span
class=”style2″>Glendale Community Coilege<br
/>
</span><br
/>
623.845.3235<br
/>
<a
href=”mailto:gary.marrer@gmail.maricopa.edu”
class=”style3″>gary.marrer@gmail.maricopa.edu</a>
</div>
<hr
/>
<a
href=”Default.aspx”>Home</a>
<a
href=”links.aspx”
class=”style4″>Links</a>
<br
/>
<br
/>
<asp:ContentPlaceHolder
id=”ContentPlaceHolder1″
runat=”server”>
</asp:ContentPlaceHolder>
<hr
/>
</div>
</form>
<p>
<asp:Image
ID=”Image2″
runat=”server”
ImageUrl=”images/Email.png” />
<asp:HyperLink
ID=”EmailHyperLink”
runat=”server”
ForeColor=”#66CCFF”
NavigateUrl=”mailto:gary.marrer@gcmail.maricopa.edu”>email Page Owner</asp:HyperLink>
<br
/>
<asp:Image
ID=”Image3″
runat=”server”
ImageUrl=”images/Print.png”
/>
<asp:HyperLink
ID=”DisclaimerHyperLink”
runat=”server”
ForeColor=”#66CCFF”
NavigateUrl=”http://www.gc.maricopa.edu/legal.html”>Campus Disclaimer</asp:HyperLink
</p>
</body>
</html>
My CIS105 Web Page
<%@
Page
Title=”"
Language=”VB”
MasterPageFile=”~/FacultyMasterPage.master”
AutoEventWireup=”false”
CodeFile=”CIS105.aspx.vb”
Inherits=”CIS105″
%>
<asp:Content
ID=”Content1″
ContentPlaceHolderID=”head”
Runat=”Server”>
</asp:Content>
<asp:Content
ID=”Content2″
ContentPlaceHolderID=”ContentPlaceHolder1″
Runat=”Server”>
<div><asp:Label
ID=”Label1″
runat=”server”
Text=”CIS105″
Font-Size=”X-Large”></asp:Label>
<asp:Image
ID=”Image1″
runat=”server”
ImageUrl=”images/Bar Chart.png”
/>
<hr
/>
</div>
<div>
<p>
Class Information<br
/><br
/>
Instructor: Gary Marrer<br
/><br
/>
Office Location: GCC Main O1-116<br
/><br
/>
Email: gary.marrer@gcmail.maricopa.edu<br
/><br
/>
Web Page: http://web.gccaz.edu/~gmarrer<br
/>
Phone: 623-845-3235 or 602-235-0374<br
/><br
/>
Twitter: gccGary
Skype: improfm<br
/>
… some text omitted…. You would add your own anyway.
<li>B (80 – 89%)<</li>
<li>C (70 – 79%)</li>
<li>D (60 – 69%)</li>
<li>F 59% and below</li>
</ul>
</p>
</div>
</asp:Content>
BlackBerry
I have been creating Java apps for my BlackBerry Curve 8330 with the BB JDE and Eclipse (See RIM Developer Site for how to get started). I am not a big app user but I have always liked the way many sites have created small apps (with colorful icons) to launch their web content (I also believe the future of mobile apps is Internet based and not locally based apps i.e iPhone). There is not a lot to this program but when loaded on the BB it is an easy way for my students to reach me (telephone and email) and info on their class.
BlackBerry Code
import net.rim.blackberry.api.browser.Browser;
import net.rim.blackberry.api.browser.BrowserSession;
import net.rim.device.api.ui.UiApplication;
final
public
class mFacSite extends UiApplication {
public
static
void main(String[] args){
mFacSite instance = new mFacSite();
instance.enterEventDispatcher();
}
�
public mFacSite() {
BrowserSession site = Browser.getDefaultSession();
site.displayPage(“http://www.garymarrer.com/facsite/”);
//System.exit(0);
}
}
Comments anyone….
In: Techie Stuff, Uncategorized, Using Mobile Tech




on May 6, 2010 at 2:45 pm
· Permalink
Hi my name iis Martin, I from Argentina. (excuse me for my English, please)
I want to launch a BB msn from a web page with javascript
In a Widget is posible launch app
for example
var args = new blackberry.invoke.BrowserArguments(‘http://www.google.com/’);
blackberry.invoke.invoke(blackberry.invoke.APP_BROWSER, args);
only in a web page is this posible??
Thanks.-
on May 31, 2010 at 9:30 pm
· Permalink
Martin, I need to see more of you code to answer your question. Send it to my email if you would like.