Showing posts with label atlas. Show all posts
Showing posts with label atlas. Show all posts

Wednesday, March 28, 2012

Multiple Update Panels Question

I'm not sure if this is an ATLAS issue or the way I'm setting this up. What I'm trying to do is have two gridviews updated when one button is clicked. When the user clicks the button the results are returned, but only when all queries to the database are complete. What I want to happen is to update the gridview to display data whenever either query completes so the user can see some data while the oter still loads. Any ideas on how to achieve this?

You need to split up your panels and make sure you're updatemode is set to Conditional. By default Always is used which updates all panels at once. You'll also need to figure out an effective way to trigger the functionality so that you essentially generate two separate callbacks to the server. Maybe click the button and fire the first update, then set a timer and fire another button to start the other update separately.

There's no real clean way to do this with UpdatePanel since it lacks a client side model at the moment. What I do for this is use 'phantom' buttons on a page that are invisible (style.display='none') but are hooked up as triggers for the UpdatePanel. It's a hack for sure, but it's easy enough to do.

Rumor has it that the next update of ATLAS is going to provide better client control of the update panel, but we have to wait for the next refresh to see what that actually looks like.

+++ Rick --


Thanks. I figured that was the only way to do it.

Multiple UpdateProgress Controls

Hi,

Does anyone know if there are plans to allow for multiple UpdateProgress controls in a future release of Atlas? This is an important requirement for most Ajax sites as activity indicators are usually located near the control that triggered the postback.

I have seen a workaround that allows you to do it using a combination of JS and CSS but it would be great if this was automatically available in the framework.

Cheers,

Jason

Do it easily using bindings in the aspx code :

<div id="myProgressUdpate1" >Data Loading</div>
<div id="myProgressUdpate2" >Data Loading</div
<script type="text/xml-script">
<page xmlns:script="http://schemas.microsoft.com/xml-script/2005">
<components>
<control id="myProgressUdpate1">
<bindings>
<binding dataContext="_PageRequestManager" dataPath="inPostBack" property="visible" />
</bindings>
</control>
<control id="myProgressUdpate2">
<bindings>
<binding dataContext="_PageRequestManager" dataPath="inPostBack" property="visible" />
</bindings>
</control>
</components>
</page>
</script>

hello.

hum...i think he wanted a solution where only one updatepanel would be show. i think that currently this won't be possible (ie, writting generic code that works in all cases) because you can't get a reference to the updatepanel that is "responsible" for the download.

if the team changes the pagerequestmanager class slightly so that it let us access the posback settings, it would be easy to get that info...


Yes, I do only want one of the updateprogress controls to show depending on the control that triggered the postback. Maybe the UpdateProgress control could be enhanced to allow triggers to be assigned in a similar way to UpdatePanels so that they only show when certain events or conditions occur.
Does anyone from MS have a comment on this one...this is a must-have feature for most AJAX apps?
I would agree, I just tried to accomplish this and without doing a lot of fancy javascript to figure out where the user clicked and show it in the right spot based on what and where things were clicked on I couldn't get it to work. Sure would be nice if UpdateProgress controls could be bound to UpdatePanel controls.

Note this is a supported scenario since ASP.NET AJAX beta 1 with "Value-Add" CTP:
You can have multiple UpdateProgress controls on a page that can run conditionally based on which UpdatePanel callback is occurring.


Thanks...I noticed this in the release notes and it is an excellent enhancement.


Would be even better if we could attach an UpdateProgress to multiple UpdatePanel...!

AssociatedUpdatePanelID="updatePanel1, updatePanel2"


Some people are just never happy ;-)

You're right though...that would be a useful extension to save duplicating the UpdateProgress controls. I can think of at least one case where I could use that although I will probably just locate an UpdateProgress control in "neutral" territory.


Why not make your lives easier and put your UpdateProgress into a UserControl that you can just drag and drop in? Works a LOT easier IMO.

Pluginbaby:

Note this is a supported scenario since ASP.NET AJAX beta 1 with "Value-Add" CTP:
You can have multiple UpdateProgress controls on a page that can run conditionally based on which UpdatePanel callback is occurring.

has anyone actually gotten this to work with either the beta 1 or beta 2 release? when i specify a value for the AssociatedUpdatePanelID property, the UpdateProgress control never appears.

thanks


Yeah...it is working for me in beta 1 although I do have to use the ClientID of the UpdatePanel control rather than just its ID, so if you are using MasterPages, it will look something like "ctl00_ContentPlaceHolder_UpdatePanel". I am therefore setting the AssociatedUpdatePanelID in the Page_Load event using UpdatePanel.ClientID so that I don't have to worry about any changes in the control hierarchy.

I had a number of problems with beta 2 and had to rollback to beta 1 so not sure if the above is the same for beta 2.

Cheers,

Jason


I made a very simple test to try out UpdateProgress in Beta 2.

There'a a Master Page with a ScriptManager on it.

A Content Page that looks like this

<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" /> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate>   <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" /> </Triggers> </asp:UpdatePanel> <br /> <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1" DynamicLayout="False"> <ProgressTemplate>loading...</ProgressTemplate> </asp:UpdateProgress> <br />   <asp:UpdatePanel ID="UpdatePanel2" runat="server"> <ContentTemplate>  <asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="Button" /> <asp:Label ID="Label2" runat="server" Text="Label"></asp:Label> </ContentTemplate> </asp:UpdatePanel> <asp:UpdateProgress ID="UpdateProgress2" runat="server" AssociatedUpdatePanelID="UpdatePanel2" DynamicLayout="False"> <ProgressTemplate>loading...</ProgressTemplate> </asp:UpdateProgress>
Code is:
 
protected static int i = 0;protected void Page_Load(object sender, EventArgs e) { }protected void Button1_Click(object sender, EventArgs e) { Label1.Text = DateTime.Now.ToLongTimeString(); System.Threading.Thread.CurrentThread.Join(1000); }protected void Button2_Click(object sender, EventArgs e) { i++; Label2.Text = i.ToString(); System.Threading.Thread.CurrentThread.Join(1000); }

It's just two buttons and two labels. The first one displays the date, the second one increases a counter. Both have an UpdatePanel and UpdateProgress. The first UpdatePanel has a trigger event, which is the Button1's click. The second UpdatePanel has both the Button2 and Label2 inside it.

The first UpdateProgress does NOT work. The second one does. I didn't have to use ClientID or Unique ID, even though I'm using Master Pages. The problem, as far as I can see, is when the UpdatePanel has a trigger.


That still does not work for me - using beta 2. I have a page (that uses a masterpage), with two web user controls, each with their own updatepanel and updateprogress controls. when i try to specify the AssociatedUpdatePanelID in either user control in the Page_Load i get the following error:

No UpdatePanel found for AssociatedUpdatePanelID 'ctl00_ContentPlaceHolder1_Weather1_WeatherUpdatePanel'

I also tried to just create a simple page (w/o using a masterpage) with 2 updatepanels, 2 updateprogress controls and 2 buttons. when i specify the AssociatedUpdatePanelID in Page_Load on this page, there is no error message, but neither UpdateProgress control is never displayed either. If I don't specify the AssociatedUpdatePanelID, then both UpdateProgress controls appear.

If anyone else has any thoughts, I'd appreciate it. I can also post code, if desired.

Thanks

Monday, March 26, 2012

MultiRequestHandler removing FORM POST parameters

Hi,


My page can not find any parameters sent using the POST methed when the following ATLAS code is contained in the web.config file:

<!-- The MultiRequestHandler enables multiple requests to be handled in one roundtrip to the server. Its use requires Full Trust.-->
<add verb="*" path="atlasbatchcall.axd" type="Microsoft.Web.Services.MultiRequestHandler" validate="false"/>
<add verb="*" path="atlasglob.axd" type="Microsoft.Web.Globalization.GlobalizationHandler" validate="false"/>
<add verb="*" path="*.asbx" type="Microsoft.Web.Services.ScriptHandlerFactory" validate="false"/>

All GET parameters are not effected.

Does anyone know how I can resolve this?

Regards

Parlster

Got it.

I misinterpretated the issue.

POST variables are removed when the Session state management is set to Cookieless:

<sessionStatecookieless="true"/>

The lost variables can be found by using GET submission or using Cookies to manage the Session:

<sessionStatecookieless="AutoDetect"/>

Regards

Parlster

Multi-threaded/Async methods with Atlas

I've recently started using ASP.NET/Atlas, I've been doing a lot of TCP work in C# with regular Windows Forms applications. All of the work I do with sockets/tcp is Async and I've been trying to get this to work to make a simple TCP Client with a terminal screen in ASP.NET using Atlas. My problem is I understand how to Invoke a delegate in Windows Forms that way you can edit controls created on the UI thread but I'm not sure how to accomplish this in ASP.NET/Atlas. I want to be able to use the Begin* methods of a socket and handle the End* method of them also. I've tried doing this with BeginRead and EndRead however when I try to set the text of a textbox from the other thread nothing happens, I can echo it out to the Debug Output. Is there a way to do this in ASP.NET?

Much thanks,
Chad

Here are a few articles that may help you:

1.http://pluralsight.com/blogs/fritz/archive/2005/02/14/5861.aspx

2.http://msdn.microsoft.com/msdnmag/issues/05/10/WickedCode/


I'll try these out, thanks a lot.

Xtek


After trying this out, I found although while useful not my goal. I'm basically trying to create a live Atlas-enabled TCP terminal. This way the text box can be edited live while the TCP Socket receives/sends data.

Thanks in advance,
Xtek


In that case you have to use some sort of a polling mechanism. You can also use sockets in JavaScript but it is a little tricky. Look at the following:

http://ajaxian.com/archives/true-javascript-sockets

But this requires a flash adapter. I have not used it so I don't have any opinions about it. I will still suggest you to go for polling.


Just what I was looking for, thanks a lot.

Xtek

My .asbx Bridge keeps giving me 404 Page Cannot Be Found

I downloaded the atlas.dll, the toolkit, and the samples. I am trying to run the Gadgets sample. If I run it locally and register the .asbx with the server (again, all locally) this works fine. if I upload the same set of files to my host I get:

GEThttp://www.mysite.com/
200 OK

GEThttp://www.mysite.com/rssgadget.css
200 OK

GEThttp://www.mysite.com/images/rss.jpg
200 OK

GEThttp://www.mysite.com/images/refresh.jpg
200 OK

GEThttp://www.mysite.com/rssgadget_wt.js
200 OK

GEThttp://www.mysite.com/aspnetforums.asbx?mn=Get&feedURL=http%3A%2F%2Fforums.asp.net%2Frss.aspx%3FForumID%3D1007
404 Not Found

I keep getting page not found. My web.config has the bridgemodule for tunneling:

<httpModules>
<add name="ScriptModule" type="Microsoft.Web.Services.ScriptModule"/>
<add name="BridgeModule" type="Microsoft.Web.Services.BridgeModule"/>
<add name="WebResourceCompression" type="Microsoft.Web.Services.WebResourceCompressionModule"/>
</httpModules>

It just never finds it. I used fiddler. It just show the 404 error. In fact, that snapshot above is from fiddler.

Thank you for any help. Is it too much to as the host to register .asbx files? Is that a security risk? Thank you.

I have tried everything here:

http://atlas.asp.net/docs/atlas/doc/bridge/tunnel.aspx

including the scriptmanager adjustment at the bottom of the page. All the results. Thanks again.

If the asbx isn't registered on the host, you aren't accessing the bridge url properly, you should be hitting

GEThttp://www.mysite.com/aspnetforumsBridge.axd?mn=Get&feedURL=http%3A%2F%2Fforums.asp.net%2Frss.aspx%3FForumID%3D1007

Basically replace .asbx with Bridge.axd

Hope that helps,
-Hao

my comment on atlas (ajax) beta 1

i installed the new ctp(beta 1) and removed it and go buck to july ctp atlas

big problems that my projects fails:

1. page.clientscript.registerstartupscript - not working

insted i found some bizar fix like Microsoft.Web.Ui.Scriptmanager.RegisterStartupScript(....)

the problem with it that (allserver controls and some client click events that use 'page.clientscript.registerstartupscript' need to be updated somehow - and who has alot of server controls and alot of code it's alot of fixing and debbuging)

2. pageMethods - not working

and even the fix is no good for a system that uses pageMethods that reads data from aspx file

because the method(function) must bestatic c# /shared on vb

and becasue the need to be static

viewstate -can't exist in static function,this/Me (this.someControlName) can't exist in static function

so my suggest is (make some compatibility) to july ctp of atlas

any why i am done with this beta realese

p.s.

great job atlas team

hello.

let me add my comments:

1. it's not a bizarre fix...it's a way to ensure that everything works. it's funny that you mention that since i was under the impression that many controlos broke because the clientscriptmanager methods were used...

2. don't tell me that you were using page methods for anything...could you give me an example where you need a page method? i mean, passing everything to the server just to get a response back is not really a performant behavior...


example u ask:

there are many ways of transfering data between pages

and yes PageMethods are one of them

i transfer from child window data to parent window with pagemethods, in parent window some function

commited and creats file with all inputs from child and parent

i got pages that use this method, that's why i need pagemethod like july ctp

----------------------------------

before atlas i used the dll below

and the way i use pageMethod i used this ajaxpro dll

so -compatibility - if no the have torebuild with every new ctp or beta

http://ajaxpro.schwarz-interactive.de/

did u ever used this ajax ? (link above)

before the big "atlas" of microsoft

there was some great dll called "ajax pro" byschwarz

and i build my system ajax on is dll.


hello again.

well, if you such ajax believer (which i'm not), then you surelly know that true ajax programming is on the client. this means you use javascript and xml and perform remote web method calls to get the data. pagemethod as it was presented in previous release was nonsense: you send everything back to the server just to get a result back on the server and in all cases, you really didn't need all that info that was sent back to the server. using it means wasting network bandwith. so i'm really glad they've removed it from the bits.

regarding ajax pro, nothing prevents you from still using it...

Saturday, March 24, 2012

My host havent got Ajax

Hi;

I want to use Ajax (codename atlas) , my project is working in my computer but my host isn't work (because my host havent got Ajax Confused )

my hosting administrator doesnt allow for setup ajax

What can I do ?please help

THANKS

Sel?uk Ak

Add the needed assemblies to your Bin folder.

Which file I must add \bin directory for standart using ?

Thanks


For RC 1 add: System.Web.Extensions.dll & System.Web.Extensions.Designer.dll usally located C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025 and if you are using the toolkit you must also add: AjaxControlToolkit.dll and this is located where ever the samplewebsite is that came with the Control Toolkit.

I can't found System.Web.Extensions.dll but in this directory (:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025)

I found microsoft.web.extensions.dll and other so I copy this file to my web aplication from the host but after that I take this mistake :(

What Can I do

Thanks

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 'Microsoft.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 37: <compilation debug="true">Line 38: <assemblies>Line 39: <add assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>Line 40: <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies>Line 41: </compilation>


Source File:C:\Inetpub\vhosts\osozluk.com\httpdocs\osozluk\web.config Line:39

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

WRN: Assembly binding logging is turned OFF.To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.Note: There is some performance penalty associated with assembly bind failure logging.To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].



Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210


You're not using the latest version. See here: http://ajax.asp.net/files/AspNet_AJAX_CTP_to_RC_Whitepaper.aspx

I uninstall ajax Ctp and setup new versiyon after I want try new ajax so I make new project ,in this projet there are only one button and a label

when I click buton label text is change, this project is working my computer but when I copy my host still this is not working (and also I make bin directory and copy System.Web.Extensions.dll ,System.Web.Extensions.Design.dll )

I take this mistake again and againSuper Angry

------------------------------------------------------------

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 37: <compilation debug="true">Line 38: <assemblies>Line 39: <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>Line 40: </assemblies>Line 41: </compilation>


Source File:C:\Inetpub\vhosts\osozluk.com\httpdocs\ajaxyeni\web.config Line:39

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.

WRN: Assembly binding logging is turned OFF.To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.Note: There is some performance penalty associated with assembly bind failure logging.To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].



Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210

My net edition can use atlas?Why but appears wrongly?

my net edition is:version 8.0.50727.42(RTM.050727-4200),I download am the newest atlas edition,But I test appears the mistake!

error is:Type is not define!

Type.registerNamespace('Samples.AspNet');
my code is:
<%@dotnet.itags.org. Page Language="C#" MasterPageFile="~/MyMain.master" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ScriptIncludes" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Head" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" Runat="Server">
<a href="http://links.10026.com/?link=javascript:showIt();">show it</a>
<script type="text/javascript" src="http://pics.10026.com/?src=aboutcontent.asmx/js"></script>
<script type="text/javascript">
function showIt()
{
alert(Samples.AspNet.AboutContent.HelloWorld());
}
</script>
</asp:Content>
AboutContent.asmx:
<%@dotnet.itags.org. WebService Language="C#" Class="Samples.AspNet.AboutContent" %>
using System;
using System.Web;
using System.Data;
using System.Data.SqlClient;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Configuration;
namespace Samples.AspNet
{
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class AboutContent : System.Web.Services.WebService
{
        [WebMethod]
public string HelloWorld()
{
return "Hello World";
}
}
}
Why can appear such mistake?  Is what my edition question or?  Please  advises, extremely thank, I did well several weeks for this question!   Once more thank

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 me!!

thanks!!


The whole idea is that the call is asynchronous. You must write OnComplete.

my web service call works from one page, not from the other.

have a user control that uses Atlas to call a web service. I drop
this control on a page in the root directory and it works with no
problem. I then add the control to another control, which is on
another page and it will not work. It does not seem to know what the
webService is.

My web service is in the same project and the ascx control and is named
meterCommunication.asmx in a folder called webService.

The control is a button ond onClick it callas a javascript function
that has the following line for calling the web service:
meterCommunication.sendMessage(meterID, commType, _onRequestComplete);

The error that I get is a javascript error that says:
meterCommunication is undefined

I can't figure out what is different between the two pages. Since this
is on a user control they should be identical.

How does the javascript know what meterCommunication is?
I don't know enough about this to troubleshoot the problem.

You need to make sure that you import the web service proxy, either in your page or in the user control. This is done using:
<scriptsrc="/yourapp/subdir/YourService.asmx/js"type="text/javascript"></script>
Maybe you have that only on the page that works?

Navigating from Atlas-page to Atlas-page problem

I have a problem with navigating from one Atlas-enabled page to another using linkbuttons. When Page 1, an Atlas page, is loaded in the browser and I click the linkbutton to go to Page 2, also Atlas-enabled, the browswer hangs.

Is there an easy answer? I will go into more detail now in case there is not.

I have worked through the Walkthroughs at ATLAS.ASP.NET (Basic, Declarative, AutoComplete, DataBinding) with no problems. Great! So I got smart and created a masterpage and content pages, recreating each walkthrough. The masterpage contains the javascript functions (in the SCRIPT tag) and the Atlas:ScriptManager, along with 4 linkbuttons for navigating between the various walkthroughs. So far no problem. I can launch the app (it starts with a default.aspx) and click any of the linkbuttons to go to whichever demo.

HOWEVER, once I am on a demo page, clicking one of the linkbuttons to go to a different demo causes the browser to hang. I can get to the next demo only by clicking Refresh, and then Retry on the popup resubmit dialog, OR by clicking Back on the browser to get to Default.aspx (a non-Atlas page), where I am free to click on the linkbutton for any of the 4 demos.

Would seeing code help? Is this some kind of conflict between postback behavior and callback behavior? Please let me know. Thanks for any comments!

hello.

how are you navigating between the pages? are the link buttons places inside updatepanels?


Thanks for replying. I discovered it was my security software that was blocking some functionality. I don't know what it could be blocking, but it has the same effect when I use Login controls, the Website Admin Tool, and I am sure some others I haven't discovered yet. The effect is that if I forget to turn down the level of protection, the firewall blocks whatever traffic is essential for those controls to work. Anyway, after I sent off my post, I remembered my past problems, turned off the firewall, and presto! things started working.

The linkbuttons were simply placed in a DIV tag on the masterpage so that I could move easily between the Atlas demos, along with the javascript for the walkthroughs. The particular walkthroughs I worked on did not use update panels, so I haven't used them yet.

Thanks again..

Navigation between pages without refreshing entire page.

Hi

How can i do page navigation without out getting any refresh on web page, LikeNikhil Kothari's Weblog www.nikhilk.net/ .

is there any atlas control to do that ? or How is it possible to enable this ?

Regards,

Gopinath, gopinathnet@dotnet.itags.org.gmail.com

That's not AJAX. It's just a fancy way of transitioning a page. You can google for "web page transition" or check out the following page for some samples:

http://www.hypergurl.com/transition.html

Wednesday, March 21, 2012

need help Atlas bridge error

hello,

I use atlas framework for my web aplication to prevent refreshing on the page. I had develop my project in my local folder and ran it then it was ok. but when I carry the atlas folder to the iis I faced with a problem like:

Server Error in '/' 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: The element 'buildProviders' cannot be defined below the application level.

Source Error:

Line 63: -->
Line 64: <compilation debug="true">
Line 65: <buildProviders >
Line 66: <add extension=".asbx" type="Microsoft.Web.Services.BridgeBuildProvider"/>
Line 67: </buildProviders
Source File: C:\Inetpub\wwwroot\mos\rac\web.config Line: 65

--------------------

I tried both compiled(published) files and precompiled files to open in iis I had same error.

Please, it is critical for me to solve this problem otherwise I could not publish this site on the net.

I need your help, (I use .net 2005+atlas framework)
Thank you from in advance

Hi,

please check thisthread.

garbin,

I really want thank you again, because I was looking for the solution of this problem for 2 days and found lots of documents but not related to solve this..

thank you again,

need help for vb populate drop down

Hello,

making progress in trying to get atlas working...But not quite there yet...

To populate the dropdownlists from a database:

Public Function populateProjectDDL()
Dim knownCategoryValues As String
Dim category As String
(...)
(Filled my dataset called ds1.)

For Each datarowitem As DataRow In ds1.Tables(0).Rows
?!?!?!?!

Next

return ?!?!?!
end function

What do I return, how do i fill the whatever i return?

(http://atlas.asp.net/atlastoolkit/Walkthrough/CCDWithDB.aspx[^]
was trying to follow that example but they lost me in the c++)

Please help me?

Made more progress, but [method error 500] in the first drop down list...

Here is my code so far:

File "Webservice.asmx":

<%@.WebServiceLanguage="VB"Class="WebService" %>

Imports System.Web

Imports System.Web.Services

Imports System.Web.Services.Protocols

Imports AtlasControlToolkit

Imports System.Collections.Generic

Namespace Wells_KM_System

<WebService(Namespace:="http://tempuri.org/")> _

<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _

PublicClass WebService

Inherits System.Web.Services.WebService

Protected ds1As DataSet

Protected dbComponent1AsNew DataBase

<WebMethod()> _

PublicFunction populateProjectDDL(ByVal knownCategoryValuesAsString,ByVal categoryAsString)As CascadingDropDownNameValue()

'Dim knownCategoryValues As String

'Dim category As String

'Which projects to show:

If Session("admin") = 1Then

ds1 = dbComponent1.selectOneCondition("Project","active", 1)

'info1.InnerText = "As admin, you see inactive projects, wells, sections and Drilling units as well."

Else

Dim querystr ="SELECT DISTINCT P.project_id, P.project_name FROM Project as P, UserRole as UR WHERE "

querystr = querystr +"UR.user_id = " & Session("active_user") &" AND "

querystr = querystr +"UR.project_id = P.project_id AND "

querystr = querystr +"P.active = 1"

ds1 = dbComponent1.query(querystr)

EndIf

Dim objTableAs System.Data.DataTable

objTable = ds1.Tables(0)

If ds1.Tables(0).Rows.Count > 0Then'user can set defaults

With objTable

Dim intRowAsInteger

Dim valuesAs List(Of CascadingDropDownNameValue) =New List(Of CascadingDropDownNameValue)

For intRow = 0To .Rows.Count - 1

values.Add(New CascadingDropDownNameValue(.Rows(intRow).Item("project_name").ToString, .Rows(intRow).Item("project_id")))

Next

Return values.ToArray

EndWith

ReturnNew CascadingDropDownNameValue() {}

'Return knownCategoryValues

'Return category

Else

ReturnNothing

EndIf

ds1.Clear()

EndFunction

EndClass

EndNamespace

And the aspx file with the drop downs:

<%@.PageLanguage="VB"AutoEventWireup="false"CodeFile="MyDefaults.aspx.vb"Inherits="Wells_KM_System.Personal_MyDefaults" %>

<%@.RegisterAssembly="AtlasControlToolkit"Namespace="AtlasControlToolkit"TagPrefix="atlasToolkit" %>

<!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<htmlxmlns="http://www.w3.org/1999/xhtml">

<headrunat="server">

<title>Set my defaults</title>

<METAhttp-equiv="Content-Type"content="text/html; charset=windows-1252">

<metacontent="Microsoft Visual Studio .NET 7.1"name="GENERATOR">

<metacontent="Visual Basic .NET 7.1"name="CODE_LANGUAGE">

<metacontent="JavaScript"name="vs_defaultClientScript">

<metacontent="http://schemas.microsoft.com/intellisense/ie5"name="vs_targetSchema">

<LINKhref="../Wells_KM_System_Styles.css"type="text/css"rel="stylesheet">

</head>

<body>

<formid="form1"runat="server">

<div>

<asp:LabelID="Label1"runat="server"CssClass="label"Style="z-index: 100; left: 35px;

position: absolute; top: 156px"Text="Select your default well:"></asp:Label>

<asp:LabelID="Label2"runat="server"CssClass="label"Style="z-index: 101; left: 33px;

position: absolute; top: 96px"Text="Select your default project:"></asp:Label>

<asp:LabelID="Label3"runat="server"CssClass="heading"Style="z-index: 102; left: 35px;

position: absolute; top: 24px"Text="Set your default values:"></asp:Label>

<asp:LabelID="Label4"runat="server"CssClass="label"Height="6px"Style="z-index: 103;

left: 35px; position: absolute; top: 214px"Text="Select your default section:"

Width="161px"></asp:Label>

<asp:LabelID="Label5"runat="server"CssClass="label"Height="1px"Style="z-index: 104;

left: 36px; position: absolute; top: 273px"Text="Select your default drilling unit:"

Width="178px">

</asp:Label>

<asp:DropDownListID="projectDDL"runat="server"CssClass="label"Style="z-index: 105;

left: 281px; position: absolute; top: 92px"AutoPostBack="True"TabIndex="1">

</asp:DropDownList>

<asp:DropDownListID="wellDDL"runat="server"CssClass="label"Style="z-index: 106;

left: 281px; position: absolute; top: 154px"AutoPostBack="True"TabIndex="2">

</asp:DropDownList>

<asp:DropDownListID="sectionDDL"runat="server"CssClass="label"Style="z-index: 107;

left: 281px; position: absolute; top: 214px"TabIndex="3">

</asp:DropDownList>

<asp:DropDownListID="drillingunitDDL"runat="server"CssClass="label"Style="z-index: 108;

left: 282px; position: absolute; top: 271px"TabIndex="4">

</asp:DropDownList>

<asp:ButtonID="Save"runat="server"CssClass="button"Style="z-index: 109; left: 34px;

position: absolute; top: 340px"Text="Save defaults"TabIndex="5"/>

<asp:LabelID="Label6"runat="server"CssClass="normal"Height="3px"Style="z-index: 110;

left: 237px; position: absolute; top: 27px"Text="(These values will be used to automatically set these values when you use the application, but you will still be able to change them)"

Width="325px"></asp:Label>

<divid="info1"runat="server"class="notice"style="display: inline; z-index: 111;

left: 578px; width: 303px; color: red; position: absolute; top: 89px; height: 54px">

</div>

<divid="info2"runat="server"class="notice"style="display: inline; z-index: 112;

left: 178px; width: 200px; color: red; position: absolute; top: 342px; height: 15px">

</div>

<atlas:ScriptManagerid="ScriptManager1"EnablePartialRendering="true"runat="server"></atlas:ScriptManager>

<atlasToolkit:CascadingDropDownID="CascadingDropDown1"

runat="server">

<atlasToolkit:CascadingDropDownProperties

TargetControlID="projectDDL"

Category="Project"

PromptText="Select a project"

ServicePath="WebService.asmx"

ServiceMethod="populateProjectDDL"/>

<atlasToolkit:CascadingDropDownProperties

TargetControlID="wellDDL"

ParentControlID="projectDDL"

PromptText="Select a well"

ServiceMethod="populateWellDDL"

ServicePath="WebService.asmx"

Category="Well"/>

<atlasToolkit:CascadingDropDownProperties

TargetControlID="sectionDDL"

ParentControlID="wellDDL"

PromptText="Select a section"

ServiceMethod="populateSectionDDL"

ServicePath="WebService.asmx"

Category="Section"/>

</atlasToolkit:CascadingDropDown>

</div>

</form>

</body>

</html>

(Only trying to populate the first drop down list for now)


Have you seenFAQ#20?

Hi,

thx for reply, but I tried that (read the faq, searched forum, read a lot of posts: that's how I got that far...)

Sometimes it gives me [Method error 12031] as well in the drop down list. And so far, as I wrote, I'm only trying to get the first drop down to populate... Think I should be good once I get one to work.

Now I'm thinking the WebService.asmx file is not even kicking in: put a breakpoint on the line:

PublicFunction populateProjectDDL(ByVal knownCategoryValuesAsString,ByVal categoryAsString)As CascadingDropDownNameValue()

But it never kicks in...

I would be very gratefull if someone manages to spot what goes wrong, I'm really eager to see this working and have been sweating on this for 4 days now...


Ok!

I watched this:

http://forums.asp.net/thread/1305208.aspx

And I noticed he populated the first one with a PageMethod, and a script on the aspx page.

I tried that and it got my first DDL populated!!! (which resulted in a little cry of joy)

Sorry about the double post, but there's no edit button, and I don't want anyone wasting time here when I solved it!

But I have no idea why this was the way to do it... But it worked...

Moving on to the next drop downs...

Microsoft #1 !!! Developpers!Developpers!Developpers! :P


Moving on to the second drop down:

1. With a breakpoint in the asmx file, it seems it's never kicking in either...

2. How would I get the first drop downs selected value (needed for the sql query for second drop down, in vb of course...)

Complete WebService.asmx:

<%@.WebServiceLanguage="VB"Class="WebService" %>

Imports System.Web

Imports System.Web.Services

Imports System.Web.Services.Protocols

Imports AtlasControlToolkit

Imports System.Collections.Generic

Namespace Wells_KM_System

<WebService(Namespace:="http://tempuri.org/")> _

<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _

PublicClass WebService

Inherits System.Web.Services.WebService

Protected ds1As DataSet

Protected dbComponent1AsNew DataBase

<WebMethod()> _

PrivateFunction populateWellDDL(ByVal knownCategoryValuesAsString,ByVal categoryAsString)As AtlasControlToolkit.CascadingDropDownNameValue()

'populate:

Dim conditionFAsString() = {"project_id","active"}

Dim conditionVAsString() = {projectDDL.SelectedValue, 1}

ds1 = dbComponent1.selectMultipleCondition("Well", conditionF, conditionV)

If ds1.Tables(0).Rows.Count > 0Then

Dim objTableAs System.Data.DataTable

objTable = ds1.Tables(0)

With objTable

Dim intRowAsInteger

Dim valuesAs List(Of CascadingDropDownNameValue) =New List(Of CascadingDropDownNameValue)

For intRow = 0To .Rows.Count - 1

values.Add(New CascadingDropDownNameValue(.Rows(intRow).Item("well_name").ToString, .Rows(intRow).Item("well_id")))

Next

Return values.ToArray

EndWith

ReturnNew CascadingDropDownNameValue() {}

Else

ReturnNothing

EndIf

ds1.Clear()

EndFunction

EndClass

EndNamespace

<%@.WebServiceLanguage="VB"Class="WebService" %>

Imports System.Web

Imports System.Web.Services

Imports System.Web.Services.Protocols

Imports AtlasControlToolkit

Imports System.Collections.Generic

Namespace Wells_KM_System

<WebService(Namespace:="http://tempuri.org/")> _

<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _

PublicClass WebService

Inherits System.Web.Services.WebService

Protected ds1As DataSet

Protected dbComponent1AsNew DataBase

<WebMethod()> _

PrivateFunction populateWellDDL(ByVal knownCategoryValuesAsString,ByVal categoryAsString)As AtlasControlToolkit.CascadingDropDownNameValue()

'populate:

Dim conditionFAsString() = {"project_id","active"}

Dim conditionVAsString() = {projectDDL.SelectedValue, 1}

ds1 = dbComponent1.selectMultipleCondition("Well", conditionF, conditionV)

If ds1.Tables(0).Rows.Count > 0Then

Dim objTableAs System.Data.DataTable

objTable = ds1.Tables(0)

With objTable

Dim intRowAsInteger

Dim valuesAs List(Of CascadingDropDownNameValue) =New List(Of CascadingDropDownNameValue)

For intRow = 0To .Rows.Count - 1

values.Add(New CascadingDropDownNameValue(.Rows(intRow).Item("well_name").ToString, .Rows(intRow).Item("well_id")))

Next

Return values.ToArray

EndWith

ReturnNew CascadingDropDownNameValue() {}

Else

ReturnNothing

EndIf

ds1.Clear()

EndFunction

EndClass

EndNamespace

----- In the aspx file:

<asp:DropDownListID="projectDDL"runat="server"CssClass="label"Style="z-index: 105;

left: 281px; position: absolute; top: 92px"AutoPostBack="True"TabIndex="1">

</asp:DropDownList>

<asp:DropDownListID="wellDDL"runat="server"CssClass="label"Style="z-index: 106;

left: 281px; position: absolute; top: 154px"AutoPostBack="True"TabIndex="2">

</asp:DropDownList>

<asp:DropDownListID="sectionDDL"runat="server"CssClass="label"Style="z-index: 107;

left: 281px; position: absolute; top: 214px"TabIndex="3">

</asp:DropDownList>

<atlasToolkit:CascadingDropDownID="CascadingDropDown1"runat="server">

<atlasToolkit:CascadingDropDownProperties

TargetControlID="projectDDL"

Category="Project"

PromptText="Select a project"

ServiceMethod="populateProjectDDLPageMethod"/>

<atlasToolkit:CascadingDropDownProperties

TargetControlID="wellDDL"

ParentControlID="projectDDL"

PromptText="Select a well"

ServiceMethod="populateWellDDL"

ServicePath="WebService.asmx"

Category="Well"/>

<atlasToolkit:CascadingDropDownProperties

TargetControlID="sectionDDL"

ParentControlID="wellDDL"

PromptText="Select a section"

ServiceMethod="populateSectionDDL"

ServicePath="WebService.asmx"

Category="Section"/>

</atlasToolkit:CascadingDropDown>


1. Check that your web.config allows Atlas to use web services (I think there's a special entry in there).

2. Have a look at the AtlasControlToolkit.CascadingDropDown.ParseKnownCategoryValuesString method as used by CarsService.cs. This method returns the selected value of a CDD and all its parents.


My web.config is good...

And I got it working by putting all the populate drop down lists in the aspx file... Seems to work, but it's ugly; would have been nicer with a asmx file.. What I did feels like a workaround (and i would have liked to use that webservice.asmx to populate similar drop downs threw the rest of my project). The end result is still much better than the entire page with tons of controls blinking, which could make a user think the datagrid was being updated at every drop down selection.

I'll still be checking here just in case someone ever spots what's wrong, or if I find out I'll come post the solution (I'm sure someone will find it useful?)

But for now I have to move on, can't stay stuck on the webservice thing too long.


Ok, last (i hope) noob question:

What's the line to get the selected value with VB?

variable = ?

Or to set it...

? = variable


Hi,

Check outhttp://forums.asp.net/thread/1391360.aspx.

Thanks,
Ted

I had a similar problem this weekend, after changing the source code for CCDs I couldn't get any of them to populate, checked all my web service methods, source code numerous times and everything seemed right. Triple checked I had copied all of the web.config settings from the sample web site, but still no joy. Eventually I spotted a new attribute attached the the web service class in the sample app, copied this to my own project and voila everything works again.

This is what needs to be attached to the class that implements your web methods:

C#
[Microsoft.Web.Script.Services.ScriptService()]

VB.NET
<Microsoft.Web.Script.Services.ScriptService()>

This the definition of my class just to show it in context

[WebService(Namespace =http://virtualrealitycycling.com/)]
[WebServiceBinding(ConformsTo =WsiProfiles.BasicProfile1_1)]
[Microsoft.Web.Script.Services.ScriptService()]
publicclassSoftwareService : System.Web.Services.WebService
{

//methods in here

}

need help to start, Scriptmanager

Hello,

First time I try to include an atlas control.

I get an error "Extender controls require a ScriptManager to be present on the page."

Attempting to create cascading drop down lists, so here is the aspx code: (took cars sample and edited)

<atlasToolkit:CascadingDropDownID="CascadingDropDown1"

runat="server">

<atlasToolkit:CascadingDropDownProperties

TargetControlID="projectDDL"

Category="Project"

PromptText="Select a manufacturer"

ServiceMethod="populateProjectDDL"/>

<atlasToolkit:CascadingDropDownProperties

TargetControlID="wellDDL"

ParentControlID="projectDDL"

PromptText="Select a well"

ServiceMethod="populateWellDDL"

Category="Well"/>

<atlasToolkit:CascadingDropDownProperties

TargetControlID="sectionDDL"

ParentControlID="wellDDL"

PromptText="Select a section"

ServiceMethod="populateSectionDDL"

Category="Section"/>

</atlasToolkit:CascadingDropDown>

<asp:DropDownListID="projectDDL"runat="server"CssClass="label"Style="z-index: 105;

left: 281px; position: absolute; top: 92px"AutoPostBack="True"TabIndex="1">

</asp:DropDownList>

<asp:DropDownListID="wellDDL"runat="server"CssClass="label"Style="z-index: 106;

left: 281px; position: absolute; top: 154px"AutoPostBack="True"TabIndex="2">

</asp:DropDownList>

<asp:DropDownListID="sectionDDL"runat="server"CssClass="label"Style="z-index: 107;

left: 281px; position: absolute; top: 214px"TabIndex="3">

</asp:DropDownList>

In the code behind I have three populate subs that fetch data from sql db:

PrivateSub populateProjectDDL()

PrivateSub populateWellDDL()

PrivateSub populateSectionDDL()

Also had some*_SelectedIndexChanged subs, that used to do the job atlas is now going to do I suppose.

Back to the problem: scriptmanager?! What is that - where do I put it? Please help me get my first alas control going... Would be very nice..

A ScriptManager tag looks like:

<atlas:ScriptManager ID="ScriptManager1" runat="server" />

You may want toread more on Atlas itself to understand what one is and what it can do.


Yeah, sry, kinda rushed that question in,

didn't think this post would even be approved, delete, close, whatever... hehe

Thx for reply, sry about this post.

Need Help With The ModalPopup Control

i have a few questions about the ModalPopup control. i was wondering if somebody more experienced could help me. I only installed Atlas yesterday - Im a bit of an Atlas newbie - so i apologise in advance if any questions sound naive.

1. when my page first loads the ModalPopup control is visible for a second or so then disappears. This has been mentioned before here:http://forums.asp.net/thread/1363694.aspx. My manager will not accept this as it looks 'odd'. Is there a fix for me?

2. when my ModalPopup control pops up the dropdownlists within the <div> below it disappear. This has also been mentioned here:http://forums.asp.net/thread/1363694.aspx. I tried re-referencing the ControlToolkit dll's as this previous poster suggested but it still doesn't work for me. Am i missing something?

3. my ModalPopup control contains a user control which is in effect a search facility. this search facility needs to post back in order to populate its grid with results. when my button within the ModalPopup control causes a post back the ModalPopup control is hidden after the post back. Can I fix this?

4. Finally, is the ModalPopup control only designed for more simple situations like the paragraph selector in your examples? Am i pushing it too hard by trying to put a more complex user control inside it that itself needs to do multiple post backs? Should I be looking at other alternatives?

Thanks for any help!

Hi Wee Bubba,

Let's go through your questions:
1. If you set "display: none" in theStyle attribute of yourModalPopup, you won't see it when it loads.
2. The drop down lists are intentionally hidden - if we didn't hide them then they would appear on top of the transparent overlay and you could manipulate them. This is a problem with IE and certain controls. A lot of people on the forums have discussed working around this by using an IFrame - and I think someone might even be working on incorporating that into the Toolkit.
3. TheModalPopup won't be visible on a postback. If you want to use it with postbacks, I would recommend wrapping the contents of the popup in anUpdatePanel.
4. You should be able to get away with anything inside aModalPopup that you can inside anUpdatePanel - which means you can do an awful lot inside of it.

Thanks,
Ted

hi ted, and thanks for your comprehensive replies. it is reassuring to know that there is such a helpful community for atlas, and this is one of the reasons why i have chosen Atlas over some of its counterparts.

i will endeavour to implement your suggestions and will come back to you if i get stuck again (if thats ok).

onwards and upwards!


hello again. i have been wrestling with this ModalPopup control all day. i am tantalisingly close but i have a few more questions to hit you with if that is ok. if you would be so kind!

it is perhaps helpful for me to describe what i am trying to achieve on this web page. basically, when my users are inserting or editing a row in my datagrid they need to specify a client code. in order for them to arrive at a client code, i am offering them a search facility where they can search by name or department. then they can select the correct entry from a results grid. this search facility is what i have put inside the ModalPopup control.

1. when my ModalPopup control gets launched, is there any way i can pass a request to the user control within it? basically i want to set the focus within a particular textbox within the user control.

2. when my ModalPopup control gets launched, is there anyway i can pass a parameter to the user control within it then execute a codebehind method automatically. e.g. so if a user is on the grid and types in 'Sm' then clicks the popup button, i would like to launch the popup and automatically fill the search textbox with 'Sm' and also show them a list of results for 'Sm' as well automatically.

3. the ModalPopup control asks for an OK button. yet i will need to close it when a user clicks on any of the links within the search results grid. can this be done?

4. Finally, when a user selects a 'hit' within my popup user control, i would like to send some of this selected data back to my grid on the main page to fill the row. is this possible?

thanks again for any help. if you like i can send this sample in once im finished with a dummy xml dataset so that you can use it as an example. just let me know.


Hi Wee Bubba,

1-3. Take a look at this post:http://forums.asp.net/thread/1386346.aspx. Unfortunately it's not completely trivial to do some of the things you want - yet. We're working on making a lot of these scenarios easier in our next release (we don't have a date yet - but it should be within the next few weeks). Essentially the strategy boils down to: 1) Do whatever it is you want to do on the server (i.e. when the user clicks a button, setup whatever content you want in yourModalPopup, etc.), 2) usingRegisterStartupScript, send back some JavaScript to the client that shows the popup. It gets tricky with theUpdatePanel, but the code in that post should be safe to copy/paste where you need it for now.

4. If everything's wrapped inUpdatePanels, you can have a server event raised by a click in your modal popup update some data in the form (and then also close theModalPopup from the server in the same way you opened it on the server).

If any of that wasn't detailed enough, please ask about any other questions that you have.

Thanks,
Ted

Ted

I do have one more unrelated question that occurred to me yesterday evening. As I was having a few difficulties implementing the ModalPopup control (I appreciate it's still in beta) I got to thinking about alternative solutions. I thought about the following 2 alternatives:

- Using an old fashioned non-Atlas javascript child window to hold my search facility.

- Placing my search facility within a hidden <div> then swapping the layer's visibility when a user clicks the popup button. (i believe i can maintain the state of the layer's visibility by including a hidden field to keep track of this).

I then tried to understand how a ModalPopup control was any different to these traditional methods I have just outlined, what advantages it had etc. To be honest I couldn't work out the difference. I couldn't tell myself why I had been working so hard to use this control, other than my mind had been focused on Atlas at the time with using the UpdatePanel.

Can you give me any reasons why it is better to use this control? Otherwise I'm thinking of using one of the old-fashioned javascript routes as described above in order to save development time. Thanks again!


Hi WeeBubba,

ModalPopup doesn't really offer a lot more than either of your solutions in terms of functionality, although its user interface may be a little friendlier. Most of the "Atlas" Control Toolkit is not designed to be better than anything you could write in JavaScript by hand (look atConfirmButton, for example). The real benefit withModalPopup is that you don't have to re-code this scenario for every page you want to behave this way - and then tweak all of those when you realize your script doesn't run quite as expected on all the browsers you have to support.

You definitely shouldn't go crazy trying to rework things just to use one of our controls if you do it much easier in JavaScript though.

Thanks,
Ted


WeeBubba - you may want to look at the example code I placed on my blog at tech-review.org. I had spent nearly three weeks trying to get the modal to be a bit more form intensive. It is actually relatively simple to do what you are trying to do if you do not not mind incorporating a bit more code into your user control. While my code is not totally documented (I wrote the article at 3 am after a well documented article was lost due to to CS loosing my session and subsequently my article... ) it is doumented where needed and provides a framework for handling actual forms within a ModalPopUp...