ConnectionStrings prefix problem

Last post 01-31-2008 8:51 AM by mediademon. 9 replies.

Sort Posts:

  • ConnectionStrings prefix problem

    03-21-2007, 4:27 AM
    • Loading...
    • Heleboel
    • Joined on 01-18-2007, 6:28 PM
    • Geldermalsen, The Netherlands
    • Posts 15

    I am building a Web Application Project with Visual Studio 2005. On one page, I added a SqlDataSource with a connectionstring.

    The problem is as follows: I get the warning "Generation of designer file failed: The expression prefix 'ConnectionStrings' was not recognized. Please correct the prefix or register the prefix in the <expressionBuilders> section of configuration."

    My application runs well, but adding controls to this page does not update the .aspx.designer.cs code behind file.

    Anyone who has a solution for this? I tried the <expressionBuilders> suggestion, but it did not work.

    Thanks in advace.
     

  • Re: ConnectionStrings prefix problem

    03-21-2007, 6:59 AM
    Answer
    • Loading...
    • aghausman12
    • Joined on 02-19-2007, 12:55 PM
    • Karachi, Pakistan
    • Posts 392
    try with the following line


     
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                    SelectCommand="SELECT * FROM [Tbl_Project]"></asp:SqlDataSource>
     
    cheers 
     
    Dont forget to click "Mark as Answer" on the post that helped you. This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
    http://www.geekswithblogs.net/aghausman
  • Re: ConnectionStrings prefix problem

    03-23-2007, 4:03 PM
    • Loading...
    • iCode
    • Joined on 03-23-2007, 8:01 PM
    • Posts 1
    I have the same problem. I have converted a 1.1 .NET application to a .NET 2.0 Web App project and I cannot get around this issue.

    The above is not going to help, thats how it puts it in the window exactly. So, typing it in does nothing.

    Any chance anyone has found a solution to this?
  • Re: ConnectionStrings prefix problem

    04-16-2007, 11:59 AM
    • Loading...
    • mtscar
    • Joined on 04-16-2007, 3:52 PM
    • Posts 2

    I had the same problem. When I would view the xxx.designer.vb file, any new controls added to the page would not get added to that file.

    I completely removed the datasource, then re-added it and things went back to working correctly.

  • Re: ConnectionStrings prefix problem

    04-16-2007, 2:22 PM
    • Loading...
    • mtscar
    • Joined on 04-16-2007, 3:52 PM
    • Posts 2

    Nevermind. I worked until I made any code changes. I just put the connection string right in the markup page, and it works that way.

  • Re: ConnectionStrings prefix problem

    09-24-2007, 4:17 PM
    • Loading...
    • mediademon
    • Joined on 09-24-2007, 4:05 PM
    • Posts 5

    I've been getting this problem and i'm suprised how little info there is out there.

    My sites are 1.1 conversions too and i've followed every suggestion i've been able to find with no luck.

    Basically, yes you can use a connection string directly inline but with a lot of pages this becomes unmanageable.

    It seems that the error:

     Generation of designer file failed:  The expression prefix “ConnectionStrings” was not recognized.  Please correct the prefix or register the prefix in the <expressionBuilders> section of configuration.

    stops the designer file from being modified with any new controls added. When this error is detected the whole designer generation process is stopped.

    Anyone else had this and solved it as opposed to working around it?

    mediademon

  • Re: ConnectionStrings prefix problem

    11-30-2007, 4:01 PM
    • Loading...
    • JoeBird99
    • Joined on 11-30-2007, 8:57 PM
    • Posts 1

    We've been experiencing the same error on a project that has not been converted at all.  Moreover, the issue popped up half way through development of the application and had previously been working fine.

    Has anyone found any solutions?
     

  • Re: ConnectionStrings prefix problem

    12-01-2007, 5:55 AM
    • Loading...
    • mediademon
    • Joined on 09-24-2007, 4:05 PM
    • Posts 5

    I still haven't found a solution, i'm still not using connectionstrings in my datasources...

    mediademon 

  • Re: ConnectionStrings prefix problem

    12-19-2007, 12:04 PM
    • Loading...
    • ptleitch
    • Joined on 03-16-2006, 5:58 PM
    • Chicago IL
    • Posts 69
    I was having this same problem. I resolved it by searching and finding two typos in the application. Notice the number of tags... <%$ <%$ connectionStrings:EXAMPLE %> %> Needed to be <%$ connectionStrings:EXAMPLE %>
  • Re: ConnectionStrings prefix problem

    01-31-2008, 8:51 AM
    • Loading...
    • mediademon
    • Joined on 09-24-2007, 4:05 PM
    • Posts 5
    Not the case here, maybe your error was about the typo's.

    Still no resolution!

    mediademon
Page 1 of 1 (10 items)
Microsoft Communities
Page view counter