voici mon problème : je ne trouve pas comment je pourrais, d'une manière simple, savoir si la requête vient d'un mobile.
Je sais qu'il existe une fonction permettant de savoir si le Browser est un Browser Mobile, mais certains mobiles (type iphone) utilisent des browser non-mobile.
Si vous avez une idée vous me sauverez la vie!! ^^
PatachouNewG, I already pointed out
Mobile Device Browser File. When you download the latest release, put the file in the App_Browser folder of your website, the IsMobileDevice property will work correctly for all the devices that are included in the file, among
which the iPhone! The only thing you'll have to do is download the latest version of this file so it will work for new devices also...
PatachouNewG, I already pointed out
Mobile Device Browser File. When you download the latest release, put the file in the App_Browser folder of your website, the IsMobileDevice property will work correctly for all the devices that are included in the file, among
which the iPhone! The only thing you'll have to do is download the latest version of this file so it will work for new devices also...
I tried your solution but I have an error that I don't understand.
I'm sorry, my error is in French...
Erreur du serveur dans l'application '/'.
Erreur d'analyse
Description :
Une erreur s'est produite au cours de l'analyse d'une ressource requise pour répondre à cette demande. Veuillez consulter ci-dessous les détails relatifs à l'erreur d'analyse en question, puis modifier votre fichier source de manière appropriée.
Message d'erreur de l'analyseur: La référence d'objet n'est pas définie à une instance d'un objet.
Erreur source:
[Aucune ligne source appropriée]
Fichier source : aucun Ligne : 1
Informations sur la version : Version Microsoft .NET Framework :2.0.50727.3082; Version ASP.NET :2.0.50727.3082
PatachouNewG
Member
7 Points
25 Posts
how can I know if the request comes from a mobile phone?
Apr 02, 2009 03:18 PM|LINK
Hi,
here is my problem : I can't find how I can know if the request comes from a mobile phone, using a simple way.
I know a fonction which enable to know if the browser is a mobile browser. But some mobiles (like iphone) use standard browser.
If you have an idea, you could save my life!! ^^
thanks for your answers
Patachou
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
Bonjour à tous,
voici mon problème : je ne trouve pas comment je pourrais, d'une manière simple, savoir si la requête vient d'un mobile.
Je sais qu'il existe une fonction permettant de savoir si le Browser est un Browser Mobile, mais certains mobiles (type iphone) utilisent des browser non-mobile.
Si vous avez une idée vous me sauverez la vie!! ^^
Patachou
mShoaib83
Participant
1361 Points
264 Posts
Re: how can I know if the request comes from a mobile phone?
Apr 02, 2009 04:00 PM|LINK
Hi,
You can get it by detecting the IP of phone. Phone IPs are different ftom Computers.
Mobile IP are similar to this: 2001:db8::1428:57ab
You can get user ip read the following article:
http://www.devasp.net/net/articles/display/273.html
Software Engineer,
Lahore, Pakistan
www.heartofpakistan.com (U/C)
--------------------------------
Mark it as ANSWER if it Helps U
PatachouNewG
Member
7 Points
25 Posts
Re: how can I know if the request comes from a mobile phone?
Apr 02, 2009 04:27 PM|LINK
Thanks for the answer mshoaib83.
But the Mobile IP you wrote looks like an IPv6 adress...
And some people have already IPv6 address on their PC...
Am I wrong?
hans_v
All-Star
35986 Points
6550 Posts
Re: how can I know if the request comes from a mobile phone?
Apr 02, 2009 09:33 PM|LINK
Mobile Device Browser File
Bullonprowl
Member
338 Points
100 Posts
Re: how can I know if the request comes from a mobile phone?
Apr 03, 2009 07:49 AM|LINK
Hi PatachouNewG, request.Browser.IsMobileDevice didnt help you?
Bharani
Please mark this post as "Answer" if it helped to solve your problem, so that others can also find it usefull while searching.
mudassarkhan
All-Star
78956 Points
13402 Posts
MVP
Re: how can I know if the request comes from a mobile phone?
Apr 03, 2009 07:58 AM|LINK
Refer here
http://davidjberman.com/blogs/csharp/archive/2008/04/10/how-to-detect-a-mobile-web-browser-using-asp-net-2-0.aspx
Contact me
PatachouNewG
Member
7 Points
25 Posts
Re: how can I know if the request comes from a mobile phone?
Apr 03, 2009 07:58 AM|LINK
This function tell me if the browser is a mobile browser. But the iphone use a normal browser, not a mobile browser.
I need to know if the request comes from a mobile phone even if it use not a mobile browser...
Here is my problem...
But thanks for your answer Bullonprowl! ^^
hans_v
All-Star
35986 Points
6550 Posts
Re: how can I know if the request comes from a mobile phone?
Apr 03, 2009 11:32 AM|LINK
PatachouNewG, I already pointed out Mobile Device Browser File. When you download the latest release, put the file in the App_Browser folder of your website, the IsMobileDevice property will work correctly for all the devices that are included in the file, among which the iPhone! The only thing you'll have to do is download the latest version of this file so it will work for new devices also...
PatachouNewG
Member
7 Points
25 Posts
Re: how can I know if the request comes from a mobile phone?
Apr 03, 2009 02:03 PM|LINK
I tried your solution but I have an error that I don't understand.
I'm sorry, my error is in French...
Erreur du serveur dans l'application '/'.
Erreur d'analyse
Description : Une erreur s'est produite au cours de l'analyse d'une ressource requise pour répondre à cette demande. Veuillez consulter ci-dessous les détails relatifs à l'erreur d'analyse en question, puis modifier votre fichier source de manière appropriée.Message d'erreur de l'analyseur: La référence d'objet n'est pas définie à une instance d'un objet.
Erreur source:
Fichier source : aucun Ligne : 1
Informations sur la version : Version Microsoft .NET Framework :2.0.50727.3082; Version ASP.NET :2.0.50727.3082
Someone already saw this error?
mudassarkhan
All-Star
78956 Points
13402 Posts
MVP
Re: how can I know if the request comes from a mobile phone?
Apr 03, 2009 02:06 PM|LINK
Did you refer the link I posted?
Contact me