Showing posts with label default. Show all posts
Showing posts with label default. Show all posts

Wednesday, March 28, 2012

very weird problem

I have installed lastest ajax and also toolkit too. I created master page and default aspx page, then I put my scriptmanager inside the master page and update panel inside the default page, I didn't choose ajax enable website because I have a hard time to place my existing web.config files, assemblies, connection strings to right place of the enable ajax's web.config file. Maybe I should though, with this error.

I get errors sometimes with all the controls in update panel, is not recognized my html tag, even though my controls are declared, it says it is not, But it builds application suscessfully. I made sure I put this

<%@dotnet.itags.org.RegisterAssembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"Namespace="System.Web.UI"TagPrefix="asp" %>

to my page and also in web.config file under config section also assemblies too. Thing is I think every time I backup my website to my documents, for some reason a while later this happens. I even reset my iis to clear my temp folder of asp.net too. Still. Why this is happening ?

You'll also need an reference to the following assemblies:

- AjaxToolKit.dll
- System.Web.Extensions.dll

You can do this using right click on your project, "Add Reference" and point to this DLL's


On bin folder, I have got these ar, cs, de, es, fr,he,hi,it,ja,ko,nl,pt, ru,tr-TR,zh-CHS, zh_CHT all
thas AjaxControlToolkit.resources.dll in it.
Then AJaxCotrolKit.dll under neat AjaxControlKit.dll.refresh and AjaxControlKit.pdb

Microsoft.Web.UI.WebControls.dll with Microsoft.Web.UI.WebControls.dll.refresh


I have these dll on my bin now, and still problem


I had these dll on program file but not pointing to my project. I am right clicking my project and add references, choosing these dll and adding but it is not showing under my bin folder for some reason, can someone tell me steps to how to add these dlls to my projects.


Is anybody didn't have this problem? I go crazy here with this..


this was nothing to do with ajax, it was copy paste problem..

Very weird error. Ajax controls call default.aspx

I have a few pages in my site... and for some reason, if there's any ajax controls on the page, it calls default.aspx and runs the code every time any aspx page with an ajax control exists on it. Problem is, default.aspx resets my session variables.

Why does Ajax call the default.aspx page code? It only runs the CS file... it doesn't actually show the default.aspx page.

I doubt it calls it. Do you have a component in your site somewhere that's got a url of "/" attached to it somewhere, and that's invoking the default page?


it only seemed to only happen when I have Certain Ajax controls on the page. Note, it only does it with Internet Explorer 6 and 7. Firefox seems to be fine.

For example, I have a collapsible PAnel in each row of a Gridview. That is in an UpdatePanel. When the Gridview is populated (and I have a breakpoint on the default.aspx.cs file), it goes through that code. Well, I set my session variables on that page, so in essence it resets them.

It seems like it does this AFTER the page is loaded, because the labels that show content based on those session variables aren't updated until I go to a new page.

It only does this when I have a collapsible panel in IE. The panel is set to collapsed.


Actually, it appears that AJAX is clearing the Session Variables. I don't know where it's doing this, though.

Monday, March 26, 2012

Visual Studio not giving me Atlas option

Hello all, I have installed all of the Ajax stuff (located here:http://ajax.asp.net/Default.aspx) but when I open up Visual Studio and go to New Website I do not see option for Atlas. Anyone know why this does not show up? Thanks, Victor Gaudioso

Hi,

Support for AJAX (the new name for ASP.Net ATLAS), is included in SP1(came out last month), for VS 2005 (and I believe the Express edition too). If you have an older version of VS, I'm not sure what you'll need to do. Good luck. BRN..

Wednesday, March 21, 2012

web is not define or other error!

Default.master:

<head runat="server">
<asp:contentplaceholder runat="server" ID="ScriptIncludes">
<atlas:script ID="Script1" runat="server" Path="~/ScriptLibrary/AtlasCompat.js"
Browser="Mozilla" />
<atlas:script ID="Script2" runat="server" Path="~/ScriptLibrary/AtlasCompat.js"
Browser="Firefox" />
<atlas:script ID="Script3" runat="server" Path="~/ScriptLibrary/AtlasCompat.js"
Browser="AppleMAC-Safari" />
<atlas:script ID="Script4" runat="server" Path="~/ScriptLibrary/AtlasCore.js" />
<atlas:script ID="Script5" runat="server" Path="~/ScriptLibrary/AtlasCompat2.js"
Browser="AppleMAC-Safari" />
<atlas:Script ID="Script6" runat="server" Path="~/ScriptLibrary/AtlasRuntime.js"/>
<atlas:Script ID="Script7" runat="server" Path="~/ScriptLibrary/Atlas.js" />
</asp:contentplaceholder>
<link href="http://links.10026.com/?link=style.css" type="text/css" rel="Stylesheet" />
<asp:contentplaceholder runat="server" ID="Head" />
</head>

aspx:

<%@dotnet.itags.org. Page Language="C#" MasterPageFile="~/MyMain.master" Title="我的导航页" %>
<%@dotnet.itags.org. Import Namespace="System.Configuration" %>
<%@dotnet.itags.org. Import Namespace="System.Web.Security" %>
<%@dotnet.itags.org. Import Namespace="System.Data.SqlClient" %>
<%@dotnet.itags.org. Import Namespace="System.Web.Services" %>
<script runat="server">

[WebMethod]
public string ShowContent(string myId)
{
return myId;
}

</script>

....

<script type="text/javascript">
function showContent(id)
{
if(document.getElementById(id).style.display=="none")
{
//document.getElementById(id).innerHTML =
PageMethods.ShowContent(id,onComplete);
document.getElementById(id).style.display="";
}
else
{
document.getElementById(id).style.display="none";
}
}
function onComplete(ret)
{
document.getElementById(id).innerHTML = ret;
}
</script>
</asp:Content>

run is error:web is not define!

<script type="text/javascript"><!--var PageMethods = { ShowContent:function(myId,onMethodComplete, onMethodTimeout, onMethodError) {return Web.Net.PageMethodRequest.callMethod("ShowContent",{myId:myId}, onMethodComplete, onMethodTimeout, onMethodError); }}

if I write code to asmx,and i call it in aspx:

<script type="text/javascript" src="http://pics.10026.com/?src=AboutContent.asmx/js"></script>

<script type="text/javascript">
function showContent(id)
{
if(document.getElementById(id).style.display=="none")
{
//document.getElementById(id).innerHTML =
Samples.AspNet.AboutContent.ShowContent(id,onComplete);
document.getElementById(id).style.display="";
}
else
{
document.getElementById(id).style.display="none";
}
}
function onComplete(ret)
{
document.getElementById(id).innerHTML = ret;
}
</script>
</asp:Content>

run is error:

type is not define:

Type.registerNamespace('Samples.AspNet');
Samples is not define!
why?
please help me how to do!!
thanks !!!
 
In order to this question I did several weeks, helped me, did I have how to solve this problem?

I already solved this problem, extremely thank the time which but I like this did:

alert(Samples.AspNet.AboutContent.HelloWorld());

Returns:[object object]

I must like this write:

alert(Samples.AspNet.AboutContent.HelloWorld(onComplete));

...

function onComplete(ret)

{

alert(ret);

}

If I do not want to write: onComplete, do I have how to do only then can obtain WebService return value? Please advises, extremely thank


please help how to do!!

thanks!!


Now again has the similar problem pulls!

my code is:

var tdId = null;
function showContent(contentid)
{
//myid = "'"+myid+"'";
var aa = document.getElementById(contentid).style.display;
if(aa=="none")
{
tdId = contentid;

alert(tdId);//Here is correct
MyDream.AboutContent.ShowContent(contentid,onAComplete);
}
else
{
document.getElementById(contentid).style.display="none";
}
}

Yesterday all was good, how now again has the problem pulls? Why? May advise me? Extremely thank