Showing posts with label learning. Show all posts
Showing posts with label learning. Show all posts

Saturday, March 24, 2012

About WebService Bridge

I'm a beginner of atlas.These days I'm learning WebService mashup in atlas. I don't know how to begin.

Is there some material of mashup in dot net for beginners? Thanks

I found this great for learning Ajaxhttp://ajax.asp.net/docs/
But I can't find document about mashup in the docs

http://ajaxian.com/archives/secure-ajax-mashups-with-the-tag

do a search on Google for mashups ajax microsoft...

Hopefully that helps

A Simple Drag & Drop problem

Hello, I'm learning Atlas and I wrote the following code for a drag and drop issue. It doesn't work so, help me to correct this code.

<%@dotnet.itags.org. Page Language="C#" AutoEventWireup="true" CodeFile="FirstDragAndDrop.aspx.cs" Inherits="FirstDragDrop" %>"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" >First Drag and Drop"server"> "text/css" rel="Stylesheet" href="FirstDragAndDropSS.css" /> "form1" runat="server"> true ID="ScriptManager" runat="server"> "ScriptLibrary/AtlasCompat.js" Browser="Firefox" /> "ScriptLibrary/AtlasUIDragDrop.js" />

class="header">Drag & Drop Example

class="main">

class="up">

class="login" id=log>

class="loginHandle">Login

class="loginContent"> "Login" runat="server">

class="calendar" id=cal>

class="calendarHandle">Calendar

class="calendarContent"> "Calendar1" runat="server">

class="down" id="dropzone">

"dropCueTemplate"class="dropCue">

Thanks

"text/xml-script"> "ScriptLibrary/AtlasUI.js"/> "ScriptLibrary/AtlasControls.js"/> "ScriptLibrary/AtlasUIDragDrop.js"/> "dropzone"> "HTML" acceptedDataTypes="'HTML'" dragMode="Move" direction="Vertical"> "dropCueTemplate"/> "log"> "loginHandle" dataType="HTML"/> "cal"> "calendarHandle" dataType="HTML"/>
the source isn't posted correctly... can't help soz!
I don't know how to do for the post to be better. I'll try to do it better.

<%@. Page Language="C#" AutoEventWireup="true" CodeFile="FirstDragAndDrop.aspx.cs" Inherits="FirstDragDrop" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>First Drag and Drop</title>
<link type="text/css" rel="Stylesheet" href="FirstDragAndDropSS.css" />
</head>
<body>
<form id="form1" runat="server">
<atlas:ScriptManager EnablePartialRendering=true ID="ScriptManager" runat="server">
<Scripts>
<atlas:ScriptReference Path="ScriptLibrary/AtlasCompat.js" Browser="Firefox" />
<atlas:ScriptReference Path="ScriptLibrary/AtlasUIDragDrop.js" />
</Scripts>
</atlas:ScriptManager>
<div class="header">Drag & Drop Example</div>
<div class="main">
<div class="up">
<div class="login" id=log>
<div class="loginHandle">Login</div>
<div class="loginContent">
<asp:Login ID="Login" runat="server">
</asp:Login>
</div>
</div>
<div class="calendar" id=cal>
<div class="calendarHandle">Calendar</div>
<div class="calendarContent">
<asp:Calendar ID="Calendar1" runat="server"></asp:Calendar>
</div>
</div>
</div>
<div class="down" id="dropzone">
<div id="dropCueTemplate" class="dropCue"></div>
</div>
</div>
<script type="text/xml-script">
<page>
<references>
<add src="ScriptLibrary/AtlasUI.js" />
<add src="ScriptLibrary/AtlasControls.js" />
<add src="ScriptLibrary/AtlasUIDragDrop.js" />
</references
<components>
<control id="dropzone">
<behaviors>
<dragDropList dataType="HTML" acceptedDataTypes="'HTML'" dragMode="Move" direction="Vertical">
<dropCueTemplate>
<template layoutElement="dropCueTemplate" />
</dropCueTemplate>
</dragDropList>
</behaviors>
</control
<!--Draggable Items--> <control id="log">
<behaviors>
<draggableListItem handle="loginHandle" dataType="HTML" />
</behaviors>
</control
<control id="cal">
<behaviors>
<draggableListItem handle="calendarHandle" dataType="HTML" />
</behaviors>
</control
</components>
</page
</script>
</form>
</body>
</html>

This looks like a sample for an older build. Here's a similar sample that works with the March CTP:

 <atlas:ScriptManagerProxy runat="server" ID="scriptManagerProxy"> <Scripts> <atlas:ScriptReference ScriptName="AtlasUIDragDrop" /> </Scripts> </atlas:ScriptManagerProxy> <div class="shim column"></div> <div class="page" id="links"> <div id="content"> <h2>Atlas.UI.DragDrop</h2> <p>This file contains script that demonstrates the drag & drop functionality.</p> <div class="dragDrop"> <div style="visibility:hidden; display:none"> <ul> <li id="dropCueTemplate" style="border-top: 1px solid #000" /> <li id="emptyHostTemplate">No draggables in this host.</li> </ul> </div> Zone 1 <ul id="zone1"> <li id="item1"> <div class="draggableFrame"> <div id="item1handle" class="handle"> <span class="handleText">Draggable 1.1</span> </div> <div id="item1data" class="draggableBody"> Draggable list item 1 from zone 1 </div> </div> </li> <li id="item2"> <div class="draggableFrame"> <div id="item2handle" class="handle"> <span class="handleText">Draggable login</span> </div> <div id="item2data" class="draggableBody"> <asp:Login ID="Login1" runat="server" /> </div> </div> </li> </ul> Zone 2 <ul id="zone2"> <li id="item3"> <div class="draggableFrame"> <div id="item3handle" class="handle"> <span class="handleText">Draggable 2.1</span> </div> <div class="draggableBody"> Draggable list item 1 from zone 2 </div> </div> </li> <li id="item4"> <div class="draggableFrame"> <div id="item4handle" class="handle"> <span class="handleText">Draggable 2.2</span> </div> <div class="draggableBody"> Draggable list item 2 from zone 2 </div> </div> </li> <li id="item5"> <div class="draggableFrame"> <div id="item5handle" class="handle"> <span class="handleText">Calendar</span> </div> <div> <asp:Calendar ID="Calendar1" runat="server" /> </div> </div> </li> </ul> </div> </div> </div> <script type="text/xml-script"> <page xmlns:script="http://schemas.microsoft.com/xml-script/2005"> <components> <control id="zone1"> <behaviors> <dragDropList dataType="HTML" dragMode="Move" acceptedDataTypes="'HTML'"> <dropCueTemplate> <template layoutElement="dropCueTemplate" /> </dropCueTemplate> <emptyTemplate> <template layoutElement="emptyHostTemplate" /> </emptyTemplate> </dragDropList> </behaviors> </control> <control id="item1"> <behaviors> <draggableListItem handle="item1handle" /> </behaviors> </control> <control id="item2"> <behaviors> <draggableListItem handle="item2handle" /> </behaviors> </control> <control id="zone2"> <behaviors> <dragDropList dataType="HTML" dragMode="Move" acceptedDataTypes="'HTML'"> <dropCueTemplate> <template layoutElement="dropCueTemplate" /> </dropCueTemplate> <emptyTemplate> <template layoutElement="emptyHostTemplate" /> </emptyTemplate> </dragDropList> </behaviors> </control> <control id="item3"> <behaviors> <draggableListItem handle="item3handle" /> </behaviors> </control> <control id="item4"> <behaviors> <draggableListItem handle="item4handle" /> </behaviors> </control> <control id="item5"> <behaviors> <draggableListItem handle="item5handle" /> </behaviors> </control> </components> </page> </script>

Is it possible to retain these postions for the widgets when the user logs in for the second time.

manjunath

Wednesday, March 21, 2012

A Problem in Downloading AjaxControlToolkit.dll

Hello All ...

I am a beginner in learning AJAX ... I installed Toolkit version 1.0.11119.0 as I am using VS.Net 2005 .. and I went through the steps that are in this link

http://www.asp.net/AJAX/AjaxControlToolkit/Samples/Walkthrough/Setup.aspx

I succeeded in accomplishing all of the steps ... However, in this step

* When the "Choose Toolbox Items" dialog appears, click the "Browse..." button. Navigate to the folder where you installed the ASP.NET AJAX Control Toolkit package. You will find a folder called "SampleWebSite", and under that another folder called "bin". Inside that folder, select "AjaxControlToolkit.dll" and click OK. Click OK again to close the Choose Items Dialog.

I couldn't open the AjaxControlToolkit.dll and I got an error message taht is saying "There was an error from assembly"


Please help me as I need to download ajax ASAP ...

Thank you :)

Are you able to run the SampleWebSite? Seems like something is wrong with the dll. Did you already try to re-download the toolkit?


I'll try to re-download it and I'll inform you soon ... I am following the steps however I don't why i get this error !!!


I'm agree withKoenSt's idea.

It's likely to be caused by some invalid configurations, please run the sample site and compare its configuration with yours, especially web.config and assembly references.


Thank youRaymond Wen - MSFT I guess you are right .. I tried to run the sample website however, I got a compilation error as the following

********************************************************************************************************************************************************

Server Error in '/ToolkitTests' Application.

Configuration Error

Description:An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message:Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

Source Error:

Line 31: <compilation debug="true">Line 32: <assemblies>Line 33: <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>Line 34: </assemblies>Line 35: </compilation>


Source File:D:\Data\Desktop\ToolkitTests\web.config Line:33

Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.

********************************************************************************************************************************************************

Moreover, when I checked the Web.config that what I found , Please check the code and inform me about the thing that need to be fixed?

<pages>

<controls>

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

<addnamespace="AjaxControlToolkit"assembly="AjaxControlToolkit"tagPrefix="ajaxToolkit"/>

</controls>

</pages>


Which version of AJAX Extension did you install? V1.0 or V3.5?

If you installed v3.5, please use the following configuration file:

<?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
<configSections>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
</sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>
<appSettings/>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true">
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</assemblies>
</compilation>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.

<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
<pages>
<controls>
<add namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" tagPrefix="ajaxToolkit"/>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</controls>
</pages>
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</httpModules>
</system.web>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<providerOption name="CompilerVersion" value="v3.5"/>
<providerOption name="WarnAsError" value="false"/>
</compiler>
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<providerOption name="CompilerVersion" value="v3.5"/>
<providerOption name="OptionInfer" value="true"/>
<providerOption name="WarnAsError" value="false"/>
</compiler>
</compilers>
</system.codedom>
<!--
The system.webServer section is required for running ASP.NET AJAX under Internet
Information Services 7.0. It is not necessary for previous version of IIS.
-->
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<remove name="ScriptModule"/>
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated"/>
<remove name="ScriptHandlerFactory"/>
<remove name="ScriptHandlerFactoryAppServices"/>
<remove name="ScriptResource"/>
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</handlers>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>


I installed version 1.0 , so could you provide me with the configuration code ..

When I open the sample website I get two errors !!


A sample web.config is available here : C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025\web.config

And it's because you are using Visual Web Designer that fail to open it.


Sorry .. but i couldn't find this path .. it is not there !!

C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025\web.config


You must edit the "Web.config" file.


I think it should be there if you have installed ajax extension.

Anyway, please refer tothis document about how to configure it.