Showing posts with label tags. Show all posts
Showing posts with label tags. Show all posts

Monday, March 26, 2012

VS 2005 and intellisense

Hi there.

I seems that when it comes to intellisense, VS 2005does not seem to cope with the AJAX tags when used from a page thatinherits from a master page. For instance, take this basic page:

<%@dotnet.itags.org. Page Language="VB" MasterPageFile="~/Master.master"AutoEventWireup="false" CodeFile="Test2.aspx.vb" Inherits="Test2"title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true">
</asp:ScriptManager>
</asp:Content

The openining "ScriptManager" is underlined in red for me as an unknownelement. I'm using VS 2005 Team Edition with the latest Beta downloadof the AJAX library. Can anyone help?

Cheers,

Mike

Just to let you know that you are not alone. I have the same problem.

Same here. I didn't realize it was the master page that was causing this problem for me though. Thanks for pointing it out.


Find the following section in the web.config file:
<pages><controls><add tagPrefix="asp" namespace="Microsoft.Web.UI" assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/><add tagPrefix="asp" namespace="Microsoft.Web.UI.Controls" assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/></controls></pages>

change it to

<pages><controls><add tagPrefix="msajax" namespace="Microsoft.Web.UI" assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/><add tagPrefix="msajax" namespace="Microsoft.Web.UI.Controls" assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/></controls></pages>

You can choose your own tag prefix, just dont' use 'asp' as a prefix. Next you must change the prefix for things like update panel to your chosen tag prefix.


wow... thanks for this!


Hi, it is a stupid problem in the all versions of VS Studion 2005. We had some discussions with guys from Microsoft, but without any results... If you use some master in the your page, and Intellisense doesn't work - just open required master page in the VS Studio, switch back to the your page and - all will be Ok...

VS cant recognize all tags from AJAX framework.

For some reason starting from Beta VS marks all tags that represent AJAX makeup as invalid even though page compiles and runs OK.

Did anybody see this?
Thanks

there's already 4 or 5 topics on this... here's one of them (http://forums.asp.net/thread/1435993.aspx)

VS doesnt recognize tags asp

Hei,

I'm getting started with ajax, i do a lot of things with the ajaxToolkit but i still have a problem,

When i put an update panel on a page, visual studio can't recognize all the asp tag, and my code loose its formating and i can't use completion (ctrl+space) anymore.

Is it a problem of web.config?

Thanks to help me.

ps: Sorry for my english ...

This is my web config

<?

xmlversion="1.0"?>

<

configuration>

<

configSections>

<

sectionGroupname="system.web.extensions"type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">

<

sectionGroupname="scripting"type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">

<

sectionname="scriptResourceHandler"type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"requirePermission="false"/>

<

sectionGroupname="webServices"type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">

<

sectionname="jsonSerialization"type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"requirePermission="false"/>

<

sectionname="profileService"type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"requirePermission="false"/>

<

sectionname="authenticationService"type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"requirePermission="false"/>

</

sectionGroup>

</

sectionGroup>

</

sectionGroup>

</

configSections>

<

connectionStrings>

<

addname="DBConnectStr"...."/>

</

connectionStrings>

<

system.web>

<!--

Recupere la langue du browser-->

<

globalizationuiCulture="auto"culture="auto" />

<

trustlevel="Medium"/>

<

pagesstyleSheetTheme="Default">

<

controls>

<

addtagPrefix="asp"namespace="System.Web.UI"assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

</

controls>

</

pages>

<compilationdebug="true">

<

assemblies>

<

addassembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<

addassembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies>

</

compilation>

<

httpHandlers>

<

removeverb="*"path="*.asmx"/>

<

addverb="*"path="*.asmx"validate="false"type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<

addverb="*"path="*_AppService.axd"validate="false"type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<

addverb="GET,HEAD"path="ScriptResource.axd"type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"validate="false"/>

</

httpHandlers>

<

httpModules>

<

addname="ScriptModule"type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

</

httpModules>

</

system.web>

<

system.web.extensions>

<

scripting>

<

webServices>

</webServices>

</scripting>

</

system.web.extensions>

<

system.webServer>

<

validationvalidateIntegratedModeConfiguration="false"/>

<

modules>

<

addname="ScriptModule"preCondition="integratedMode"type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

</

modules>

<

handlers>

<

removename="WebServiceHandlerFactory-Integrated"/>

<

addname="ScriptHandlerFactory"verb="*"path="*.asmx"preCondition="integratedMode"type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<

addname="ScriptHandlerFactoryAppServices"verb="*"path="*_AppService.axd"preCondition="integratedMode"type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<

addname="ScriptResource"preCondition="integratedMode"verb="GET,HEAD"path="ScriptResource.axd"type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

</

handlers>

</

system.webServer>

</

configuration>noone for me?

VS Editor does not recognize Atlas tags

This is what I have in web.config:

<controls>

<addtagPrefix="asp"namespace="Microsoft.Web.UI"assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<addtagPrefix="asp"namespace="Microsoft.Web.UI.Controls"assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<addtagPrefix="asp"namespace="Microsoft.Web.Preview.UI"assembly="Microsoft.Web.Preview"/>

<addtagPrefix="asp"namespace="Microsoft.Web.Preview.UI.Controls"assembly="Microsoft.Web.Preview"/>

</controls>

This is my aspx page:

<asp:ScriptManagerID="ScriptManager1"EnablePartialRendering="true"runat="Server">

</asp:ScriptManager>

This is the error I am getting in VS:

Error 1 Element 'ScriptManager' is not a known element. This can occur if there is a compilation error in the Web site. C:\Documents and Settings\RAFAL\My Documents\development\RFMain\ImportData\MainSite\Auctions.aspx 53 10 http://localhost/ekit/

Oh, I have figured this out. It was coming from master page. This line was creating problem:

<style>

.row {

background-color:white;

}

.rowSelected {

background-color:gray;

}

</style>


hi

could you (or anyone else) explain what you changed to make this work? What was the couse of your problem?

I have the same problem but I don't understand your fixit post and I can't see how that relates to what I have here.

cheers

A


hi.

I have a similar problem here.If my page has a master page then I can't get to see the ajax tags in the content page. If the page doesn't have a master page then i can see the ajax tags.

I can't understand how your fix works - would you (or anyonw) be able to explain why it solves the problem?

cheers

A


Seems like if there is any syntax problem on the page or the master page, that is when it is happening. Not sure how to find that original syntax problem. Maybe somebody else can recommend... Try to check manually for all HTML/ASP tags, make sure all is correct, that is what I can recommend now. Do it for the page and master as well as those are joined together later...

Saturday, March 24, 2012

Wanting to programmatically turn UpdatePanel on and off

I'd like to have a checkbox on my page thet lets me turn the atlas feature on and off. (just as if I had removed the <atlas:UpdatePanel> tags from my web page. Is there some way to do that?

Hi Peter,

I believe you should be able to just turn the partialpagerendering property to false on the scriptmanager control. This will then disable partial page updates.

Hope this helps,

Scott