.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

switch to compatibility mode in IE8 via Code C#

Posted By:      Posted Date: September 20, 2010    Points: 0   Category :ASP.Net

hi everybody,

 how can I switch to IE8 compatibility mode in page load by C#?


thank you very much

View Complete Post

More Related Resource Links

Whats wrong with this code, im getting blue line under the createStatus next the switch

Error message: Use of unassigned local variable 'createStatus'
            MembershipCreateStatus createStatus;
            MembershipUser newUser = Membership.CreateUser(Username.Text, Password.Text, Email.Text);

            switch (createStatus)
                case MembershipCreateStatus.Success:
                    this.CreateAccountResults.Text = "The user account was successfully created!";
                case MembershipCreateStatus.DuplicateUserName:
                    this.CreateAccountResults.Text = "There already exists a user with this username.";
                case MembershipCreateStatus.DuplicateEmail:
                    this.CreateAccountResults.Text = "There already exists a user with this email address.";
                case MembershipCreateStatus.InvalidEmail:
                    this.CreateAccountResults.Text = "There email address you provided in invalid.";
                case MembershipCreateStatus.InvalidPassword:
                    this.CreateAccountResults.Text = "The password you provided is invalid. It must be seven characters long and have at least one non-a

Master page... How to set compatibility mode in IE8

Hi..Im using this code in master page <head><meta http-equiv="X-UA-Compatible" content="IE=7" /></head>In IE7 all my content is perfect..In IE8 itz not perfect so i write the above code but still not working? what to do? 

Have templatefield in edit mode and datasource defined in code behind

Is this possible? Some sample code:<asp:GridView ID="gvConcerns" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None"> <RowStyle BackColor="#EFF3FB" /> <Columns> <asp:TemplateField HeaderText="Number" Visible="true" SortExpression="Number"> <EditItemTemplate> <asp:Label ID="lblEditNo" runat="server" Text='<%# Eval("number") %>'></asp:Label> </EditItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Part" Visible="true" SortExpression="part"> <EditItemTemplate> <asp:Label ID="lblEditPart" runat="server" Text='<%# Eval("part") %>'></asp:Label> </EditItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="List" Visib

Cannot switch to design mode - Load Failed! Cannot Load fpacutl10.dll

I have just upgraded from Visual Studio 2005.  I cannot switch to design mode in my Web Application project.  I keep getting the following error:Load Failed! Cannot Load fpacutl10.dll.Any reason for this?  I have just run Windows Updates and I still get the issue.Thanks in advance.

DetailsView error "must be in edit mode to update a record" when I have set edit mode in code behind

Hi,I have a DetailsView within an UpdatePanel.  I programmatically put the DetailsView into edit mode, change the fields then call the UpdateItem method which causes the "must be in edit mode to update a record" exception.  Am I missing something blindingly obvious? <asp:UpdatePanel ID="upSpecificShout" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true" > <ContentTemplate> <asp:DetailsView ID="dvSingleShout" DataSourceID="sdsSingleShout" runat="server" AutoGenerateRows="false" OnDataBound="SetDVIcons" HeaderStyle-CssClass="noDisplay" DefaultMode="ReadOnly" AutoGenerateEditButton="true" OnItemCommand="dvItemCommand"> <fields> <asp:TemplateField ShowHeader="false"> <ItemTemplate> <asp:Panel ID="dlSpecificDetailsViewPanel" runat="server" CssClass="i_am_a_shout"> <h2><asp:LinkButton ID="lblShoutTitle" runat="server" Text='<%# Bind("Shout_Title") %>' On

Release mode application throws Break instruction exception - code 80000003 when running in WinDbg


Here is the initial output of my program after running it from WinDbg:

CommandLine: "C:\Documents and Settings\Administrator\My Documents\Work\QMI_Test_Tool\QMI_UT_Source\Release\QMI Validation Tool.exe"
Symbol search path is: SRV*c:\symbols*http://msdl.microsoft.com/download/symbols
Executable search path is: 
ModLoad: 00400000 0048f000  QMI Validation Tool.exe
ModLoad: 7c900000 7c9b2000  ntdll.dll
ModLoad: 79000000 7904a000  C:\WINDOWS\system32\mscoree.dll
ModLoad: 7c800000 7c8f6000  C:\WINDOWS\system32\KERNEL32.dll
ModLoad: 77dd0000 77e6b000  C:\WINDOWS\system32\advapi32.dll
ModLoad: 77e70000 77f03000  C:\WINDOWS\system32\RPCRT4.dll
ModLoad: 77fe0000 77ff1000  C:\WINDOWS\system32\Secur32.dll
ModLoad: 7c420000 7c4a7000  C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4053_x-ww_e6967989\MSVCP80.dll
ModLoad: 78130000 781cb000  C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4053_x-ww_e6967989\MSVCR80.dll
ModLoad: 77c10000 77c68000  C:\WINDOWS\system32\msvcrt.dll
ModLoad: 7c9c0000 7d1d7000  C:\WINDOWS\system32\SHELL32.dll
ModLoad: 77f10000 77f59000  C:\WINDOWS\system32\GDI32.dll
ModLoad: 7e410000 7e4a1000  C:\WINDOWS\system32\USER32.dll
ModLoad: 77f60000 77fd6000  C:\WINDOWS\system32\SHLWAPI.dll
ModLoad: 7c4c0000 7c53d000  C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4053_x-ww_e6967989\m

Switch FormView to Edit Mode from Repeater ItemCommand


The following code successfully displays a record in a FormView and sets the FormView mode to 'Edit' when the user clicks on a LinkButton within a Repeater, however the record is not Updated. If I don't change the .SelectCommand and call .DataBind, I'm able to update the first record that is displayed. Naturally that's a moot point because the idea is to be able to update the record that the user selects in the Repeater. Because of the design of the FormView and Repeater, the record *must* be updated via the FormView. Updating the record via the Repeater is not an option.

    Protected Sub RepeaterMessages_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.RepeaterCommandEventArgs)

        Select e.CommandName
            Case "Edit"
                SqlDataSourceMessageDetail.SelectCommand = "SELECT [Id], [MessageDateTime], [MessageOwner], [Subject], [Body], [AllowReplies], [ExpirationDateTime], [IsCityWideMessage], [DepartmentId], [BranchId], [CompanyFacilityId], [ShowNumber], [IsHighPriority], [UpdateDateTime] FROM [Messages] WHERE ID = " & e.CommandArgument

changing Asp.net Gridview's cell from Label to edit mode in code behined file


 Hi all,

In my asp.net application i'm using gridview to which i'm binding data dynamically by writing a select query in code behined file (all column's are autogenerated) now i want to change gridview cell to edit mode from label to textbox or dropdown on clicking of gridview's cell.How can i achive this in code behined file.

thanks in advance

SQL Compatibility mode upgrade from SQL2000 to SQL 2008


Hi, i have a Dynamics AX db that the client asked me to upgrade to SQL2008 compatibility mode...

Is it as simple as going to the drop down and going straight to SQL 2008? Obviously i must test first but is threre anything else i need to do or look out for...

Testing... Just make sure the AX still works? How can i test?



Want to cancel edit mode of gridview in the code.


I have several places where I have a gridview and dataview set, and when I hit an edit button on the gridview it opens up the dataview.  

When I hit a cancel button fom the dataview I have this code that returns mew to the gridview:

        dvwUser.Visible = false;
        gvwUserList.Enabled = true;
        gvwUserList.Visible = true;


        dvwUser.Visible = false;


Switch to edit mode with javascript


Hi all!

I have a custom masterpage that I have stripped of everything in a vain attempt at making sharepoint dump something close to clean html. This means I have hidden the ribbon, menus and the global form that the entire page is wrapped in. Now since I want authors to be able to edit the page I want a simple button that switches the page to edit mode. Once in edit mode the default masterpage (v4) should take over giving the user the ribbon and all the other editing goodness.

The edit page button is THE ONLY THING I want from the original masterpage. Is this possible? Is it possible to trigger the switch through some other javascript? This seems like a really basic feature that should not be hard to find, but for all my googling I haven't found anything.

IIS web site server code: detecting if client browser supports TLS https encrption mode



Due to security restrictions, we must run our web site under the TLS variant of https (SSL is disabled on the server...only TLS is enabled on the server).

The problem we have is that some customers have TLS disabled in their Internet Explorer  Tools/Internet Options/Advanced settings...and they get a "page cannot be displayed" error.

I need a way to tell those users to "go enable TLS on your browser" (like display a page for this saying this).

Can you tell me how I can determine if (with the server having only TLS...not SSL...enabled) if the browser can support the https?

Some more details on the issue:

I've watched the conversation between the browser client and the server, and it appears that the conversation flow is as follows:

1.) Browser broadcasts to the server which https protocols it supports (and has enabled) (i.e. SSL 1.0, SSL 2.0, TLS 1.0, etc.)

2.) Server checks its configuration (which https protocols are setup to be allowed on the server) and returns back on one of the browser client matching protocols.


What I need to determine is how to detect if TLS is enabled on the browser that makes a request (determine it in the ASP.NET server code), so I can generate a page (in the case TLS is not supported on the IE browser) to inform the user.

Compatibility Mode change whilst log shipping



I have a database in compatibility mode 80 being log shipped from one SQL Server 2005 instance to another.  I want to change the compatibility mode on the database to 90, but was wondering what, if any, affect this would have on log shipping?  The database vendors have already confirmed that the database/application is compliant.

Thanks, Andy

SQL Server 2005 in 2000 compatibility mode/turn off - what are the effects?

I researched this previously, but it's been months and I'm hoping someone has a handy link of reliable information. Given the scenario:

1) currently have sql server 2000
2) upgrade to sql 2005
3) sql 2000 compatibility mode is turned on

months go by inserting and updating data

4) what happens to existing tables and data when you turn OFF 2000 compatibility (to take advantage of varchar(max) and other stuff?

Is there a reliable list somewhere? any drops and recreation of columns? any butchered or loss of data? How reliable is the SQL Upgrade Advisor ?

What about sp_dbcmptlevel (Transact-SQL) for 2005 and ALTER DATABASE Compatibility Level (Transact-SQL) for 2008?

All of this assumes very large existing tables/databases from years of data storage...with stored procs and indices, etc...

Has anyone actually done this? (Turned off sql2000 compatibility on a database with data)

. · * ´ ¨ )
.· `

Code Optimized Web Development Profile (VS 2010 and .NET 4.0 Series)

When you first run VS 2010 it prompts you to select an IDE profile to use. The profile you select will configure how tool windows are displayed/docked in the IDE by default and set the default keyboard shortcuts. You can then customize any of these settings by using the Tools->Options menu within the IDE and then override/change them. You can also later reset your profile and pick a different one by choosing the Tools->Import and Export Settings menu command.

Free Code Snippets - ASP.NET

You Can Find Useful ASP.NET Related Posts on the above link.

Free Code Snippets - C#

Free C# Code Snippets
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend