Wireless connection

N

Nina

I need to establish simple wireless connection from Handheld application and
by clicking on a button open a web site.
I'm using:
[SerializableAttribute]
public class HttpWebRequest : WebRequest
{
HttpWebRequest request =
(HttpWebRequest)WebRequest.Create("http://www.google.com/");
}
This code gives me an error: InvalidCastException
 
P

Peter Foot [MVP]

Because you are defining your own class called HttpWebRequest when that
already exists in the base class library, even if they both derive from
WebRequest you can't cast between them. Explain in more detail what you are
trying to achieve and we can suggest a code sample. For example do you want
to retrieve just the raw data from a site, display it within your
application in a WebBrowser control or launch internet explorer with a
specific addres...

Peter

--
Peter Foot
Microsoft Device Application Development MVP
peterfoot.net | appamundi.com | inthehand.com
APPA Mundi Ltd - software solutions for a mobile world
In The Hand Ltd - .NET Components for Mobility
 
N

Nina

I need to launch internet explorer with an address like:
http://0.00.000.00:8080/Enforcement
where users can see working web application with data and buttons on the
form.

Thank you.

Peter Foot said:
Because you are defining your own class called HttpWebRequest when that
already exists in the base class library, even if they both derive from
WebRequest you can't cast between them. Explain in more detail what you are
trying to achieve and we can suggest a code sample. For example do you want
to retrieve just the raw data from a site, display it within your
application in a WebBrowser control or launch internet explorer with a
specific addres...

Peter

--
Peter Foot
Microsoft Device Application Development MVP
peterfoot.net | appamundi.com | inthehand.com
APPA Mundi Ltd - software solutions for a mobile world
In The Hand Ltd - .NET Components for Mobility

Nina said:
I need to establish simple wireless connection from Handheld application
and
by clicking on a button open a web site.
I'm using:
[SerializableAttribute]
public class HttpWebRequest : WebRequest
{
HttpWebRequest request =
(HttpWebRequest)WebRequest.Create("http://www.google.com/");
}
This code gives me an error: InvalidCastException
 
S

Simon Hart [MVP]

Not sure if this is what you want, but check this out:
http://www.simonrhart.com/2008/08/loading-to-web-page-using-default.html
--
Simon Hart
Visual Developer - Device Application Development MVP
http://www.simonrhart.com

Nina said:
I need to launch internet explorer with an address like:
http://0.00.000.00:8080/Enforcement
where users can see working web application with data and buttons on the
form.

Thank you.

Peter Foot said:
Because you are defining your own class called HttpWebRequest when that
already exists in the base class library, even if they both derive from
WebRequest you can't cast between them. Explain in more detail what you
are
trying to achieve and we can suggest a code sample. For example do you
want
to retrieve just the raw data from a site, display it within your
application in a WebBrowser control or launch internet explorer with a
specific addres...

Peter

--
Peter Foot
Microsoft Device Application Development MVP
peterfoot.net | appamundi.com | inthehand.com
APPA Mundi Ltd - software solutions for a mobile world
In The Hand Ltd - .NET Components for Mobility

Nina said:
I need to establish simple wireless connection from Handheld application
and
by clicking on a button open a web site.
I'm using:
[SerializableAttribute]
public class HttpWebRequest : WebRequest
{
HttpWebRequest request =
(HttpWebRequest)WebRequest.Create("http://www.google.com/");
}
This code gives me an error: InvalidCastException
 

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

Top