How To Check Browser Version
Jun 8, 2010I have a website that I want to restrict only to Internet Explorer, how do I do that? Code is ASP.net
View 9 RepliesI have a website that I want to restrict only to Internet Explorer, how do I do that? Code is ASP.net
View 9 RepliesHow can i find what version of browser a user is using and ask him to upgrade it
View 7 RepliesI'm try to get my site to detect what browser someone is using to ensure they're using one that is compliant with our site. Everything works, except Firefox seems to post the wrong version in the Request.Browser variables.I'm on Firefox 3.6.10, but Request.Browser shows Mozilla 1.9.2.10. It's correct in the HTTP_USER_AGENT string:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.10) Gecko/20100914 YFF35 Firefox/3.6.10 ( .NET CLR 3.5.30729)
Is there a way to detect it better without having to parse through the HTTP_USER_AGENT string?
i need to get the Browser version, type of the user. i need the short name not the long one.
at the monent i have this:
browser = Request.ServerVariables("HTTP_USER_AGENT") that retuens this:
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.1.249
i need only (Chrome/4.1.249), (MSIE 8.0)...............
plus i would like to get the operating system too
I have asp.net application with framework v3.5 compatibility.. How do i check that which framework is currently installed in client P.C. If client using old framework version, i want to acknow. him by a message box.....
View 2 RepliesHow to force Refresh( F5) conditaionally wehn the pages meet new design.
I have some javascript files for each browser version and for different browsers. I want to include this files in script tag of script manager. Is it will detect these files and load based on browser version? Is there is best way to handle this scenario declaratively in markup insted of codebehind?If not declaratively how in code behind?
View 2 RepliesWe have an ASP.NET web application and it's hosted using IIS 6.0, in the app we have these several javascript and css files located in a folder, and for performance sake (according to YSlow) we set the folder content expiration header to 1 year. Everything worked just fine until recently when we deployed the latest build to the server, in which we had made some changes to those javascript and css files. For some reason after the deployment some of our end users don't see the latest changes when they connected to the app, even after they cleared the cache in IE. We have also restarted the IIS on the server and the problem still remained. When I went into the IE Temporary Internet Files folder on one of these machines I saw the files were still the older version and not the latest one, I had to manually delete the files from the Temporary Internet Files folder then they were able to see the latest changes. I'm baffled by this, how come only some users who couldn't see the changes but some others do (without having to do anything by the way), and how do I make sure that for future releases we won't have to do anything like what did (manually deleting the cached files)? For now I disabled the Content Expiration option in IIS for these files but I would like to know if there is a way that I can enable the content expiration (to help performance) but at the same time making sure when the files are updated, the latest version will be used for the end user (instead of the cached version)?
View 3 RepliesMy application depends on JavaScript, I want to check the client browser's JavaScript is enabled or not and raise an alert message if its turned off.
View 4 RepliesHow to check browser support html5?
View 2 RepliesI need to stop users users using the browser back button and potentially submitting an old version of a form.
I'm storing a guid in a session variable and also writing the value to a hidden form field and then checking the session value against the hidden field value if a user does try to navigate back and submit an old form.
If the form is submitted and the user wants to complete a new copy of the form then a new guid is generated both to the session and to the hidden form field. Now, if the user decides to hit the back button a few times to get the old form and tries to submit it again, the page checks the current guid in session against the guid stored in the form field and it finds a mismatch and prevents the form being submitted.
This works as expected in Chrome and Firefox, but in IE6, when the user hits the back button to view the old form, the new guid value appears in the hidden field of the old form! This means the user can submit the old form again, which we definitely do not want.
I am creating an application which will offer option to users to select language manually instead of culture settings. But I need to offer only those languages which are installed/setup in browser. This will be used to judge user preferences.
View 2 Replieshow check installed excel version using excel application in asp.net
I created Excel object Dim oXL As Excel.Application
What is the best method of checking to see if ajax hover control is possible with a browser?
View 1 RepliesI'm opening new window from Code Behind for that I'm using Code :
Dim newWin As String = ("<script language='javascript'>" + "window.open('msgstat.aspx' , 'Print', 'height=200, width=220, menubar=no, toolbar=no, scrollbars=no, resizable=no'); </script>")
ClientScript.RegisterStartupScript(Me.GetType(), "pop", newWin)
Now, how can I check from codebehind that Browser's Popup Blocker is enabled or Disabled and show such message.
I have an application that posts to a form on a different page, on a different site. Everything works fine unless the user presses the back button.The way it'ssetup now, if th euser forgets their pin, they click alink which takes them to a popup window. The enter their info and then they're sent a new pin. Fine.However, I'm trying to account for all possible scenarios. What if the user forgets their pin, is taken to this other page, and then decides they remembered their pina nd presses the back button. They'll need to reload in order to be able to try to post again, otherwise the session variables I'm using to log them in won't reset (I reset some in the page load event).Is there anyway to detect whether the page was arrived at via the browser back button so that I can reload it?
View 2 RepliesI want to create a custom attribute to check if the browser has cookies and javascript enabled. I'm guessing I would create a ActionFilterAttribute that would redirect to a controller action to load a page to check cookies and javascript on the client side. If they are enabled then it would redirect to the desired action, otherwise display an error message. Is this a correct approach or is there a better way to do this?
View 1 RepliesMy requirement is that I have a few hyperlinks on a webpage and when the user clicks on these hyperlinks I should redirect the user to an asp.net web page(Default.aspx) in a different website.
For the 1st time when the user clicks on one of the hyperlinks it will launch a new browser window with the Default.aspx loaded and then if the user clicks on some other hyperlink I want to redirect the user to the existing browser window(in which deafult.aspx is already loaded)with the content related to this particular hyperlink loaded,instead of launching a new browser window/tab.
But I am not sure of how to achieve this.I wonder if I can add some js to the asp.net Default.aspx page to achieve this.
i am having a application in which java script is must. but i am facing problem when at any client browser has java script disabled. i want a code using which i can check the browsers java script enabled/ disabled property so that the user cannot login until he enables javascript.
View 2 RepliesAre the Crystal Reports objects within Visual Studio (I'm using 2005) the full version or is it a trial version that is missing features?
View 1 RepliesWe have an application that is already deployed in the production environment. And currently it is using Dundas evaluation version. We tried updating it to the licensed version by simply pasting the dll file. but we got the error message as "The file has not been pre-compiled and cannot be requested".
View 1 RepliesI am trying to insert html pages to MySQL with my Asp.NET project but i am getting error; You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'de Osman patlaması', '', '<div style="text-align: center"> <img src="/i' at line 1
How can i fix that problem my server side code is;
MySqlConnection myCon = new MySqlConnection();
myCon.ConnectionString = ConfigurationManager.ConnectionStrings["MySQLConnectionString"].ConnectionString;
MySqlCommand cmd = new MySqlCommand();
cmd.CommandType = CommandType.Text;
string query = @"INSERT INTO `test`.`posts` (`id`, `author`, `title`, `description`, `content`, `ispublished`, `iscommentsenabled`, `pubDate`, `lastModified`, `raters`, `rating`, `slug`, `tags`, `categories`) VALUES (NULL, '{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}', '{7}', '{8}', '{9}', '{10}', '{11}', '{12}')";
query = String.Format(query, p.author, p.title, p.description, p.content, p.ispublished, p.iscommentsenabled, p.pubDate, p.lastModified, p.raters, p.rating, p.slug, p.tags, p.categories);
cmd.CommandText = query;
cmd.Connection = myCon;
cmd.Connection.Open();
cmd.ExecuteNonQuery();
cmd.Connection.Close();..............
Is there any limit on the size/numbers in the version number of the FormsAuthenticationTicket.
I tried to create an ASP.NET cookie using forms authentication, with a large version number(ex: 1234567 need this number for identification purposes). But when I decrypt the cookie I get 135 as the version number.
Initially the old forms authentication cookie was removed, in order to add new information.
Response.Cookies.Remove(FormsAuthentication.FormsCookieName);
Following is the code I used to create the FormsAuthentication cookie.
FormsAuthenticationTicket newAuthTicket = new FormsAuthenticationTicket(1234567, un, DateTime.Now, DateTime.Now.AddHours(5F), false, user_data);
HttpCookie newauthCookie = new HttpCookie(FormsAuthentication.FormsCookieName, FormsAuthentication.Encrypt(newAuthTicket));
Response.Cookies.Add(newauthCookie);
After retrieving the cookie, the version number I got was 135. This number varies with different version numbers.
string cookieName = FormsAuthentication.FormsCookieName;
HttpCookie authCookie = Context.Request.Cookies[cookieName];
if (authCookie == null)
{
return;
}
FormsAuthenticationTicket authTkt = null;
authTkt = FormsAuthentication.Decrypt(authCookie.Value);
if (authTkt == null)
{
return;
}
int versionID = authTkt.Version;
Can someone let me know if it's a bad idea to use such big version numbers, or am I missing something in this.
I have Visual Studio 2008 installed on this workstation with SQL 2000, 2005 Express, 2008 Express and I think 2008 R2 (not sure if that is a version itselve or not)
I will call that workstation HOME
I created some tables in SQLEXPRESS through VS2008.
I worked on this project on another workstation that I just installed VS2008 annd SQLEXPRESS 2008 and I know that was R2
Installed Visual Studio 2010 trial edition between the thiem I made the tables on HOME and tonight for the first time since that install
I am now getting the "cannot be opened becuase it is version Version 661. This Server supports version 655..."
What to do now?
I can opened SQLExpress 2008 management studio and it is running.
So is my SQL 2000. The problem seems to be that after the VS2010 install neither VS2008 or VS2010 can connect to the SQLExpress 2008
What do I do now?
I can't remove sql 2000 because it is tied to several 3+ gig databases that will not work in Express.
i am working in webapplication in asp.net using c#.I have a problem that currently i am using ajaxcontroltoolkit version 3.0.20820.0 but in this toolkit i don't have Editor Ajax control so i want to upgrade it with new version ajaxcontroltoolkit version 3.5.40412.2
When i upgrade it then my old ajax control is not working like validatorcalloutextender and requiredfieldvalidator etc.
so please tell me how can i upgrade ajaxcontroltoolkit version from 3.0.20820.0 to version 3.5.40412.2
i also use in web.config file but not successfull.