Go Back
  • SQL Instance Connection String Issues

    Recently, we have started moving our MSSQL production databases to another server which has multiple instances of SQL server.

    I've been trying to get things to connect from a .NET web app with little success.

    I found a great blog post which has been updated over time to include more details regarding the exact issue I've encountered.

    http://blogs.msdn.com/b/sql_protocols/archive/2007/05/13/sql-network-interfaces-error-26-error-locating-server-instance-specified.aspx

    One potential issue is with the port used to communicate between the web and SQL server. Instances ...

  • Using AJAX Control Toolkit Tabs

    Here are a couple of links I found useful while working with the AJAX Control Toolkit tabs.

     

    Nested tabcontainers


    http://forums.asp.net/t/1544396.aspx

    Active tabpanels

    http://forums.asp.net/t/1364667.aspx

  • Static ClientIDs in ASP.NET 4.0

    Today I was running into some issues that seemed related to my JavaScript not being able to resolve a ClientID of a control properly.

    The code was:

    var menu = $find("<%= HeaderNavMenu.ClientID %>");

    This was to help resolve the actual ClientID which was coming out as ctl00_cphMainNavigation_C008_ctl00_ctl00_HeaderNavMenu.

    While looking into this, I ran into a blog post by Rich Strahl, titled, ClientIDMode in ASP.NET 4.0.

    I tried ClientIDMode="Static" on my control and ...

  • ASP ImageButton Transparent PNG 'Quirk'

    I ran into a transparent png calendar icon which I was using fine on one page over a white background that for some reason showing up with a gray background.

    My background color was #FFFFFF or 255, 255, 255 and the area around my transparent PNG was showing up as 245, 245, 240.

    Since I was using an <asp:ImageButton>, I was able to fix the problem by setting the BackColor="Transparent" attribute.

    I'm guessing that this ...

  • Referencing a ASP.NET control from Javascript

    Sometimes you need to reference a particular HTML element from JavaScript... say a div, but all of this is going into an ASP.NET user control and you want to make sure that if there is a need to use more than one of these user controls on the page, the JavaScript won't get confused.

    Since an ASP panel will render out a a div, this is a good choice because ASP.NET will automatically take care ...

  • Javascript in the Head Section from Code Behind

    If you need to actually include a script or dynamically build a script, using variables available in your code behind:

    Dim Include As HtmlGenericControl = New HtmlGenericControl
    Include.TagName = "script"
    Include.Attributes.Add("type", "text/javascript")
    Include.InnerHtml = "alert('We added it to the head');"
    Page.Header.Controls.Add(Include)
     

    Or to include a reference to a script file:

    Dim Include As HtmlGenericControl = New HtmlGenericControl
    Include.TagName = "script"
    Include.Attributes.Add("type", "text/javascript")
    Include.Attributes.Add("src", "myScript.js")
    Page.Header.Controls.Add(Include)...

  • Retrieving AppSettings in ASP.NET 4.0

    In some earlier projects, I had been using this way of referencing AppSettings.

    Imports System.Configuration
    ...
    Dim myVar As String = ConfigurationSettings.AppSettings("mySetting")

    This is considered deprecated in the 4.0 framework. Here is a newer way to make the same reference.

    Imports System.Web.Configuration
    ...
    Dim myVar As String = WebConfigurationManager.AppSettings("mySetting")

    This is a much simpler way than the example found on MSDN.

  • Ensuring Unique Control IDs in Sitefinity

    I had a control which used the Ajax Control Toolkit hover menu extender, but once I dragged on multiple copies of my control in Sitefinity only the first would work properly.

    When looking at the source code of my rendered page, the ID of each of the pieces of my control were identical for each instance. I believe this wouldn't be an issue outside of Sitefinity, so I turned first to the Sitefinity forum to ...

  1. 1
  2. 2
  3. Next page