Showing posts with label working. Show all posts
Showing posts with label working. Show all posts

Wednesday, March 28, 2012

ContextKey not working in AutoCompleteExtender

My project works fine if I do not useContextKey at all.

If I remove ContextKey from VB code and removeUseContextKey,ContextKey fromHTML it works fine.

Here's my VB code and HTML declaration

Pl let me know what I need to do to make it work.

TIA

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

PublicFunction GetCompletionList(ByVal prefixTextAsString,ByVal countAsInteger,ByVal ContextKeyAsString)AsString()

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

<cc2:AutoCompleteExtenderID="AutoCompleteExtender1"runat="server"

TargetControlID="txtFirstName"ServicePath="AutoComplete.asmx"

ServiceMethod="GetCompletionList"UseContextKey="true"ContextKey="First_Name"MinimumPrefixLength="1"

CompletionInterval="1000"EnableCaching="true"CompletionSetCount="12">

</cc2:AutoCompleteExtender>

What does not work if you use the context key? Does it not return any results? Does it not use the context key? Do you get a javascript error? Have you taken a look at the usage of ContextKey in the Toolkit solution. You should find some under the ToolkitTests project or if you download the code from the Development tree then under Testing.Client project.


Hi MP11,

If you do some modifications on your web.config, we suggest that you should save the web.config without any changes to avoid the cache issues before your debug it. If it doesn't work, please add breakpoints to your webservice to debug it step-by-step.

I hope this help.

Best regards,

Jonathan


Kirti

If I drop ", ByVal ContextKey As String" from web service VB code and drop the "UseContextKey="true" ContextKey="First_Name"" from HTML, AutoCompleteExtender works just fine.

Jonathan,

I have a break point in VB code but it does not break when I use contextkey. It breaks if I do not use ContextKey.

Mahesh


PS I did not make it very clear about what I want to do. I want to call the same web service method for two different textboxes viz. txtFirstName and txtLastName. I want to pass a parameter value txtFirstName or txtLastName via ContextKey.


Hi MP11,

mp11:

PublicFunction GetCompletionList(ByVal prefixTextAsString,ByVal countAsInteger,ByVal ContextKeyAsString)AsString()

Please useByValcontextKeyAsString)AsString() instead ofContextKey. It is recommended that you should save your web.config without any modifications before you debug it if you have done some changes to the WebService.

I hope this help.

Best regards,

Jonathan


Jonathan,

I'm back after a brief vacation.

Your suggestion about contextKey worked.

Thanks a lot.

Monday, March 26, 2012

Confused about hosting and Atlas

I'm ready to start working with ASP.NET 2.0 and I'm looking for hosting plans for my website. However, I'm confused about Atlas. Can I use Atlas and all the AJAX extensions on any hosting provider that gives me ASP.NET? I was looking to use aplus.net for my hosting. Does anyone know if I can use aplus.net for this? If not, can someone give me a good hosting site?

Thanks!

The hosting site has to install it seperately. It does not come automagically with all asp.net hosting companies (although over time it probably will). There are a number of hosting companies that do offer it,...ultimahost.com being one I can think of off the top of my head.
Just copy the required Microsoft AJAX dll's to the \bin\ directory. I can't see how that should be a problem anywhere, or why you would need to install it (I've have done this on my own site).
That will only work if you can set your web site to run in full trust mode, most hosting providers don't allow this. There are several threads on the forum about this already with some explanations.

ConfirmButtonExtender NOT Working in Gridview Template Field since BETA1

Here is the Code for the Template Field in the Gridview exactly as it is documented:

Am I missing something or just more AJAX BETA woes?

<asp:TemplateFieldShowHeader="False">

<ItemTemplate>

<asp:ImageButtonID="ImageButtonDelete"runat="server"CausesValidation="False"CommandName="Delete"ImageUrl="~/App_Themes/Sameday/Images/DeleteX.gif"/>

<cc3:ConfirmButtonExtenderID="ConfirmButtonExtenderDelete"ConfirmText="Are you sure you want to Delete?"runat="server"TargetControlID="ImageButtonDelete">

</cc3:ConfirmButtonExtender>

</ItemTemplate>

</asp:TemplateField>

Please try this:http://forums.asp.net/thread/1441672.aspx

ConfirmButtonExtender not working after PostBack

Hi All,

A small problem I'm having: I have a page with a ConfirmButtonExtender which works absolutely perfectly when the page is first loaded.

However as soon as I do a PostBack - whether I'm selecting something in a GridView, clicking a different button, choosing a value from a DropDownList, or whatever - it stops working. It doesn't throw any error, it just has no effect and the button it's targeting just runs its OnClick procedure straight away.

Anyone have any idea what's causing this and how I can get around it?

Many thanks in advance,
Dale

Could you please post a small sample demonstrating the problem?

Well, there's not a lot to post really! :)

I have a page with various controls on, some of which AutoPostBack, along with an Atlas ScriptManager and an register assembly directive at the top of my page. I then have the ConfirmButtonExtender control:

<cc1:ConfirmButtonExtenderID="ConfirmButtonExtender1"runat="server">
<cc1:ConfirmButtonPropertiesTargetControlID="Button1"ConfirmText="Are you sure you want to copy?"/>
<cc1:ConfirmButtonPropertiesTargetControlID="Button1"ConfirmText="Are you sure you want to delete?"/>
</cc1:ConfirmButtonExtender>

And as I said, it works perfectly when the page first loads but not at all after it posts back to itself, be that by e.g. changing pages on a GridView, selecting from a DropDownList or whatever. What confuses me is that it does work when the page is first loading, so presumably there's nothing that wrong with the code!

I've tried it with just the one ConfirmButtonProperties as well, still the same problem.

Any thoughts would be much appreciated!

Thanks,
Dale


Please post a complete page that demonstrates your problem with as few elements as possible - we want to be able to see the same problem to investigate it. Thanks!

ConfirmButtonExtender - how to use ConfirmOnFormSubmit

Hi,

Can anyone please post a working example about how to useConfirmOnFormSubmit property ofConfirmButtonExtender ?

Thanks!

Here is a video tutorial on the extender.

http://www.asp.net/learn/ajax-videos/video-119.aspx


Hi,

I'd say ConfirmOnFormSubmit is either deprecated or was never implemented. I don't see it in my object browser. There's not much out there, other than this documentation which seems to be inaccurate:

http://asp.net/ajax/control-toolkit/live/ConfirmButton/ConfirmButton.aspx

It says:

ConfirmOnFormSubmit - True if the confirm dialog should wait until just before the form submits to display. This is useful when ASP.NET validators are in use and the confirm should be shown only after all validators pass.

Pete


Yes Pete. This is the only information I got from the web search.

I tried many time to use it because my project need to do the validation first and ONLY when the validation passed, we need show the confirmation popup.

Thanks anyway!


Within the Button properties, under theConfirmButtonExtender you must set theConfirmOnFormSubmit to'True'
Only then will the Pop-up only appear if validation has passed true.


Here is my code, the ConfirmOnFormSubmit DOES NOT work. Did I get it wrong? Apprecite your help!
TestConfirmButton.aspx 
<%@. Page Language="C#" AutoEventWireup="true" CodeFile="TestConfirmButton.aspx.cs" Inherits="TestConfirmButton" %><%@. Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %><!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>Untitled Page</title></head><body> <form id="form1" runat="server"> <div> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> Enter an even number: <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <asp:CustomValidator ID="CustomValidator1" runat="server" ErrorMessage="CustomValidator" ControlToValidate="TextBox1" OnServerValidate="CustomValidator1_ServerValidate"></asp:CustomValidator> <br /> <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox> <br /> <asp:Button ID="Button1" runat="server" Text="Save" OnClick="Button1_Click" /> <ajaxToolkit:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server" ConfirmText="Warning!"ConfirmOnFormSubmit="true" TargetControlID="Button1" Enabled="True"> </ajaxToolkit:ConfirmButtonExtender> <br /> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> <br /> <asp:Label ID="Label2" runat="server" Text="Label"></asp:Label></div> </form></body></html>

TestConfirmButton.aspx.cs

using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;public partialclass TestConfirmButton : System.Web.UI.Page{protected void Page_Load(object sender, EventArgs e) { Label1.Text =""; Label2.Text =""; }protected void Button1_Click(object sender, EventArgs e) { Label1.Text ="Saved!";// Display whether the page passed validation.if (Page.IsValid) { Label2.Text ="Page is valid."; }else { Label2.Text ="Page is not valid!"; } }protected void CustomValidator1_ServerValidate(object source, ServerValidateEventArgs args) {try {// Test whether the value entered into the text box is even.int i =int.Parse(args.Value); args.IsValid = ((i % 2) == 0);//args.IsValid = false; }catch (Exception ex) { args.IsValid =false; } }}

Correct me, but are you trying to use the 'ConfirmButtonExtender' as a popup for the validation of the even number?


I just used the evaluation of the even number as an example to use the ConfirmButtonExtender's ConfirmOnFormSubmit.

The thing I wanted to achieve is:

The confirm message popups only when the number is even; if the number is odd, then don't popup the confirm message.

Is this do-able at all?

Thanks!


Hi,

The ConfirmOnFormSubmit property indicates that the ConfirmMessage will popup when the page is to be submitted. So, only the failure of client side validation( That's to say, you need to enable clientValidation for this customValidator. ) is able to prevent the form from being submitted, subsequently the ConfirmMessage won't be shown.

Now consider your situation, the confirm box has to be shown when the validation fails, which means the form isn't able to submit. It's a paradox. You may need to implement it withconfirm method.

Hope this helps.

ConfirmButton not working

Hi,

I have a page with an update panel and a repeater inside the panel. I have a multi view inside the repeater item template. In that multiview, I have a view with a delete button and a confirm button extender. When you click on the delete button, the confirm alert appears (not always), but at the same time an asyncrhonous postback occurs, the record is deleted by the code behind page and the page is refeshed, but you have not clicked 'OK' nor "Cancel" yet.

Note: Using Beta

Here is the web page:

<%@dotnet.itags.org. Page Language="C#" AutoEventWireup="true" CodeFile="Templates.aspx.cs" Inherits="Templates" %>
<%@dotnet.itags.org. Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

<!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>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="sm" runat = "server" />
<asp:ObjectDataSource ID="CategoriesDataSource" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetCategories" TypeName="DataLayer.ProtocolCategory"></asp:ObjectDataSource>
Select a category:
<asp:DropDownList ID="CategoriesDropDown" runat="server"
DataSourceID="CategoriesDataSource" DataTextField="CategoryName"
DataValueField="CategoryID" Width="250px"
AutoPostBack = "true" />
<br /><br /><hr /><br />
<asp:UpdatePanel ID="up" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:ObjectDataSource ID="TemplatesDataSource" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetTemplates" TypeName="DataLayer.ProtocolTemplate">
<SelectParameters>
<asp:ControlParameter ControlID="CategoriesDropDown" DefaultValue="0" Name="CategoryID"
PropertyName="SelectedValue" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
<table border="1" width="100%" >
<thead>
<tr>
<td align="center" colspan="4">Available templates</td>
</tr>
<tr>
<td width="25%">Name</td>
<td width="70%">Description</td>
</tr>
</thead>
<tbody>
<asp:Repeater ID="TemplatesRepeater" runat="server"
DataSourceID="TemplatesDataSource" OnItemCommand="TemplatesRepeater_ItemCommand" >
<ItemTemplate>
<tr>
<asp:MultiView ID="ItemMultiView" runat="server" ActiveViewIndex="0">
<asp:View ID="ReadOnlyView" runat = "server">
<td>
<asp:Label ID="NameLabel" runat="server"
Text= '<%# Eval("TemplateName") %>' />
</td>
<td>
<asp:Label ID="DescriptionLabel" runat="server"
Text = '<%# Eval("Description") %>' />
</td>
<td>
<asp:Button ID="EditButton" runat ="server"
CommandName="edit" Text="Edit" />
</td>
<td>
<asp:Button ID="DeleteButton" runat = "server" UseSubmitBehavior="false"
CommandName = "delete" Text= "Delete"
CommandArgument = '<%# Eval("TemplateID") %>' />
<ajaxToolkit:ConfirmButtonExtender ID ="ConfirmButton" runat="server"
ConfirmText = "You are about to delete this template. Click ok to proceed"
TargetControlID = "DeleteButton" />
</td>
</asp:View>
<asp:View ID="EditView" runat="server">
<td>
<asp:TextBox ID="NameTextBox" runat ="server"
Text= '<%# Eval("TemplateName") %>' />
</td>
<td>
<asp:TextBox ID="DescriptionTextBox" runat="server"
Text = '<%# Eval("Description") %>' />
</td>
<td>
<asp:Button ID = "SaveButton" runat = "server"
CommandName= "save" Text = "Save"
CommandArgument = '<%# Eval("TemplateID") %>' />
</td>
<td>
<asp:Button ID = "CancelButton" runat = "server"
CommandName = "cancel" Text = "Cancel" />
</td>
</asp:View>
</asp:MultiView>
</tr>
</ItemTemplate>
<FooterTemplate>
<td>
<asp:TextBox ID="NameTextBox" runat ="server"
Text= '<%# Eval("TemplateName") %>' />
</td>
<td>
<asp:TextBox ID="DescriptionTextBox" runat="server"
Text = '<%# Eval("Description") %>' />
</td>
<td>
<asp:Button ID = "AddButton" runat = "server"
CommandName= "add" Text = "Add" />
</td>
</FooterTemplate>
</asp:Repeater>
</tbody>
</table>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="CategoriesDropDown" EventName="SelectedIndexChanged" />
</Triggers>

</asp:UpdatePanel>
</div>
</form>
</body>
</html>

And a fraction of code behind:

protected void TemplatesRepeater_ItemCommand(object source, RepeaterCommandEventArgs e)
{
if (e.CommandName == "edit")
EditItem(e);
else if (e.CommandName == "cancel")
CancelItem(e);
else if (e.CommandName == "save")
SaveItem(e);
else if (e.CommandName == "delete")
DeleteItem(e);
else if (e.CommandName == "add")
AddItem(e);

}

private void DeleteItem(RepeaterCommandEventArgs e)
{
int TemplateID = int.Parse((string) e.CommandArgument);
DataLayer.ProtocolTemplate.DeleteTemplate(TemplateID);
this.TemplatesRepeater.DataBind();
}

I have removed the update panel, but still does not work.

The first time the page is rendered (HTTP GET) no AjaxControlToolkit.ConfirmButtonBehavior are created.

When you click on the delete button a regular postback occurs, the row is deleted and I get the following error on a browser alert:

Line: 1960
Error: Sys.ArgumentException:Value must not be null for Controls and Behaviors
Parameter name:element

The page source code contains the following javascript code:

Sys.Application.add_init(function() {
$create(AjaxControlToolkit.ConfirmButtonBehavior, {"ConfirmText":"You are about to delete this template. Click ok to proceed","id":"ConfirmButton"}, null, null, $get('DeleteButton'));
});
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.ConfirmButtonBehavior, {"ConfirmText":"You are about to delete this template. Click ok to proceed","id":"TemplatesRepeater_ctl00_ConfirmButton"}, null, null, $get('TemplatesRepeater_ctl00_DeleteButton'));
});
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.ConfirmButtonBehavior, {"ConfirmText":"You are about to delete this template. Click ok to proceed","id":"TemplatesRepeater_ctl01_ConfirmButton"}, null, null, $get('TemplatesRepeater_ctl01_DeleteButton'));
});

Obviously the first $create call fails because $get('DeleteButton') returns null since 'DeleteButton' does not exist.

If you continue clicking delete buttons you continue getting these errors, no confirmation alert message is shown.

Confirm button is the simplest control in Ajax Control Toolkit. I think at least this one should work :-(


I'm getting the exact same thing, except I am using a DataList instead of a Repeater.

I have decided not to use confirm button, instead I'm using the following:

 <script type="text/javascript"> function ConfirmDelete(e) { if (!window.confirm("You are about to delete this categorie.\nClick OK to proceed, cancel otherwise")) { e.returnValue = false; if (e.preventDefault) e.preventDefault(); return false; } } </script>
<asp:ImageButton ID="DeleteButton" runat ="server"
ImageUrl ="Images/delete.png" Height="16px" Width="16px"
CommandName ="delete" ToolTip="Delete"
CommandArgument ='<%# Eval("HospitalID")%>'
OnClientClick="ConfirmDelete(event);"
/>
Did this issue get resolved? I'm also finding that my ConfirmButton control is not in an Update panel.
Please try your scenario with the recently available10301 release of the Toolkit (andASP.NET AJAX 1.0). If the problem persists, then please reply with acomplete, simple, self-contained sample page that demonstrates the problem so that we can investigate the specific behavior you're seeing. Thank you!

Saturday, March 24, 2012

ConfirmButtomExtender not working with <input type="button">

I'm using the ConfirmButtomExtender in my project with the following setup.

<MasterPage>

ScriptManager

<ContentPlaceHolder>

UpdatePanel

<Wizard>

ConfirmButtonExtender

<Input id="xx" runat="server" name="cancel">

I started by using the <asp:button> but get an Assertion Failed error message, because I set the button to Visible=False. Setting the style visibility=hidden does not seem to work with the asp:button. So I switched to the html input instead. However what happens when I click the button is the event fires for the button without waiting for the confirmation box response. I thought this was supposed to catch the event. I would still prefer to use the asp:button but if I can't hide the button then it defeats the purpose. Is this a bug? Are their any work arounds?

Extenders won't work for controls that aren't marked as "runat=server".

Remember that Visible=False prevents a control from rendering out to the client, so that's why you are getting an assertion. Atlas can't find the control it's supposed to be hooked up to.

Visiblity:hidden should work fine. This worked for me (looks like you've got an = instead of a : in there):

<asp:Button ID="Button2" style="visibility:hidden" runat="server" Text="Button" />


Fair enough.

Thnaks

Conditional xml-script

I working with Beta 2 and CTP for November, I'd like to make a drop down that when it changes if the value isn't US then it changes a label to be Province instead of the default state. Can someone please help me?OK, so this post has been open for several days, is there seriously no one in this community who can tell me how to get xml-script working with a simple example? All I want to be able to do is use xml-script to bind two controls together so that if the country drop-down is changed to something besides country it changes the text property of a label or the innerhtml of a div to province instead of state. I didn't think this one would sit so long with no reply... Am I just missing the tutorial or quickstart where this is explained? Thanks for any help you can offer.

Condition wont work?

Dear all:

here is my code for condition action.

but it looks like not working.

anything wrong?

I can't find any sample in the website.

thanks a lotl

<cc1:AnimationExtender ID="AnimationExtender1" runat="server" TargetControlID="hlProducts"> <Animations> <OnHoverOver> <Condition ConditionScript="$get('divProductsBlock').style.display == 'none';"> <Sequence> </Sequence> </Condition> </OnHoverOver> </Animations></cc1:AnimationExtender>

I have the same problem. Could you solve it?

I even put:

<Animations>
<OnClick>
<Condition ConditionScript="'1'=='1'">

and it dosent work. :(

Someone any idea?

Wednesday, March 21, 2012

Composite Control with AsyncPostBack problem

Hello,

i have created a composite control ( imagebutton and linkbutton) with couple of properties etc... everything is working fine!

am using ajax also , but when i click on the imagebutton from that composite control an asyncpostback is called while if i click on linkbutton i get a normal postback ! weird!

anyone has an idea on this?

thank you its urgent

part of the composit control !

imagebtn =newImageButton();

imagebtn.ImageAlign =ImageAlign.AbsMiddle;

if (!isInabled)

{

imagebtn.Enabled =false;

}

imagebtn.CommandName ="Click";if (isDD.Equals("True"))

{

imagebtn.ID ="Anchor";

}

Controls.Add(imagebtn);

Controls.Add(newLiteralControl(" "));if (imagebtnAlign.Equals("top"))

{

Controls.Add(newLiteralControl("<br>"));

}

button =newLinkButton();

if (!isInabled)

{

button.Enabled =false;

}

button.CssClass = textCssName;

button.CommandName ="Click";

Controls.Add(button);


Hi,

Please try to force a postback with the following code:

button =newLinkButton();

if (!isInabled)

{

button.Enabled =false;

}

button.CssClass = textCssName;

button.CommandName ="Click";

button.Attributes.Add("onclick", "__doPostBack('" + button.ClientID + "','');");

Hope this helps.

Composite Control - ScriptManager - WebMethod

Hi!

I am working on a composite control in which I add a ScriptManager programmatically. I also have a static method exposed as [WebMethod] inside the Composite Control. I have set the script manager's EnablePageMethods=true.

I added this control to a web page, but when I run the page, it seems that the Web Method client-side scripts are not being generated. Is there a way to make this work?

Thank you!

Not directly, no. pagemethods are only available as a collection when they're written in the codefile; I'm not sure of the reasoning behind this. You have three options for composite controls aside from using UpdatePanels:

1) expose properties to let the page developer specify a web service / service method.

2) expose a property to let the page developer specify a pagemethod (this could be combined w/ #1 to let the dev. use either one)

3) use Sys.Net.WebRequest calls to the containing page, and mimic the post data that would go on a full postback. Optionally, add a custom header that tellsyour control that it's an ajax call so that you can respond with only the data instead of the whole page markup.

Complex page with slider control works locally, but breaks when run from production server

I have my ASP.NET 2.0 AJAX product working fine on my local machine. However, when I upload it to our production server and run it from there, I get the following Javascript error when the page first loads:

IE: "Microsoft JScript runtime error: Object doesn't support this property or method"
Firefox: "this.control.get_text is not a function"

It occurs on line 239 of the Slider control's WebResource.axd:

var _elementValue = Number.parse(this.control.get_text());

When running locally, the runs under the VS2005 built in web server athttp://localhost:xxxx/MyGossip/. The production server's address is ishttp://production/MyGossip/.

The page source is as follows (there are a couple of trivial web service methods in the code behind that are not shown):

<%@dotnet.itags.org. Page Language="C#" AutoEventWireup="true" CodeFile="Search.aspx.cs" Inherits="Search" %>

<%@dotnet.itags.org. Register Assembly="RadTabStrip.Net2" Namespace="Telerik.WebControls" TagPrefix="radTS" %>
<%@dotnet.itags.org. Register src="http://pics.10026.com/?src=Stars.ascx" TagName="Stars" TagPrefix="uc1" %>

<!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">
<link type="text/css" rel="stylesheet" href="http://links.10026.com/?link=Results.css" />
<link type="text/css" rel="stylesheet" href="http://links.10026.com/?link=Default.css" />
<link type="text/css" rel="stylesheet" href="http://links.10026.com/?link=Rating.css" />
<title>MyGossip - Search tours</title>
</head>
<body>

<form id="Form1" runat="server">

<atlas:ScriptManager ID="s1" EnablePartialRendering="true" runat="server">
<Scripts>
</Scripts>
</atlas:ScriptManager>

<table align="center" style='width:800px;'>
<tr>
<td>
Min rating
</td>
<td colspan="2">
Max cost (0 for none)</td>
<td style='width: 199px'>
<atlas:UpdateProgress ID="UpdateProgress1" runat="server">
<ProgressTemplate>
<span id="DivProgress" style='font-size:90%; position:relative; top:-9px; left:200px; background-color:#666699;color:white; font-weight:bold;padding:3px;'>
Loading...
</span>
</ProgressTemplate>
</atlas:UpdateProgress>

</td>
</tr>
<tr>
<td style='width:300px;'>

<asp:DropDownList ID="DropDownListRating" runat="server" AutoPostBack="True" CssClass="textbox" Visible="false">
<asp:ListItem Value="0">All ratings</asp:ListItem>
<asp:ListItem Value="1">At least *</asp:ListItem>
<asp:ListItem Value="2">At least * *</asp:ListItem>
<asp:ListItem Value="3">At least * * *</asp:ListItem>
<asp:ListItem Value="4">At least * * * *</asp:ListItem>
<asp:ListItem Value="5">At least * * * * *</asp:ListItem>
</asp:DropDownList>


<atlasToolkit:Rating ID="RatingMinRating" runat="server"
CurrentRating="0" Direction="LeftToRight" ReadOnly="false" StarCssClass="ratingStar"
WaitingStarCssClass="savedRatingStar" FilledStarCssClass="savedRatingStar" EmptyStarCssClass="emptyRatingStar">
</atlasToolkit:Rating>


</td>
<td style='width:1px;'>
<asp:TextBox ID="SliderMaxCost" runat="server" style='width:80px;' AutoPostBack='true'></asp:TextBox>
</td>
<td style='width:80px;'>
<asp:TextBox ID="TextBoxMaxCost" runat="server" MaxLength="5" Columns="5" AutoPostBack="true" CssClass="textbox"></asp:TextBox>
<atlasToolkit:SliderExtender ID="SliderExtender1" runat="server">
<atlasToolkit:SliderProperties TargetControlID="SliderMaxCost" BoundControlID="TextBoxMaxCost"
Decimals="0" Minimum="0" Maximum="1000" Length="80" /></atlasToolkit:SliderExtender>
AUD
</td>
<td style='text-align:right;'>
<asp:Button ID="Button1" runat="server" Text="Update" />
</td>
</tr>
<tr>
<td colspan="4">

<atlas:UpdatePanel ID="UpdatePanelResultGrid" runat="server">

<Triggers>
<atlas:ControlEventTrigger ControlID="RatingMinRating" EventName="Changed" />
<atlas:ControlEventTrigger ControlID="Button1" EventName="Click" />
</Triggers>

<ContentTemplate>

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1"
style='width:100%' CellPadding='4' AllowPaging='True' AllowSorting='True'>
<Columns>
<asp:TemplateField HeaderText="Activity" SortExpression="name">
<ItemTemplate>
<span class="ResultTitle">
<asp:Label ID="Label1" runat="server" Text='<%# Bind("name") %>'></asp:Label>
</span>
<br />
<asp:Label ID="Label3" runat="server" Text='<%# Bind("description") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="duration" HeaderText="Duration" SortExpression="duration" />
<asp:BoundField DataField="departs" HeaderText="Departs" SortExpression="departs" />
<asp:BoundField DataField="price" DataFormatString="{0:0.00} AUD" HeaderText="Cost"
SortExpression="price" />
<asp:TemplateField HeaderText="Rating" SortExpression="rating">

<ItemTemplate>
<uc1:Stars ID="Stars1" runat="server" Rating='<%# Eval("rating") %>' />
</ItemTemplate>
</asp:TemplateField>

<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="LinkButtonShowDetails" runat="server" Text="more"></asp:LinkButton>
<atlasToolkit:ModalPopupExtender ID="ModalPopupExtenderDetails" runat="server">
<atlasToolkit:ModalPopupProperties
TargetControlID="LinkButtonShowDetails"
PopupControlID="PanelPopupDetails"
DynamicControlID="LabelPopupDetailsDynamic"
DynamicContextKey='<%#Eval("name")%>'
DynamicServiceMethod="GetContent"
OkControlID="ButtonPopupDetailsClose"
BackgroundCssClass="ModalBackground" />
</atlasToolkit:ModalPopupExtender>

|

<asp:LinkButton ID="LinkButtonAddToShortlist" runat="server" Text="shortlist"></asp:LinkButton>
<atlasToolkit:ModalPopupExtender ID="ModalPopupExtenderShortlist" runat="server">
<atlasToolkit:ModalPopupProperties
TargetControlID="LinkButtonAddToShortlist"
PopupControlID="PanelPopupShortlist"
DynamicControlID="LabelPopupShortlistDynamic"
DynamicContextKey='<%#Eval("name")%>'
DynamicServiceMethod="AddToShortlist"
OkControlID="ButtonPopupShortlistClose"
BackgroundCssClass="ModalBackground" />
</atlasToolkit:ModalPopupExtender>

</ItemTemplate>
</asp:TemplateField>

</Columns>
</asp:GridView>
</ContentTemplate>

</atlas:UpdatePanel>

</td>
</tr>
</table>

<asp:Panel ID="PanelPopupDetails" runat="server" style='display:none;' CssClass='Popup'>
<h3>
<asp:Button ID="ButtonPopupDetailsClose" runat="server" Text="Close" style='float:right' />
<asp:Label ID="LabelPopupDetailsDynamic" runat="server" />
</h3>

<radTS:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1" SelectedIndex="0"
Align="justify"
style='margin-bottom: -1px;'>
<Tabs>
<radTS:Tab runat="server" Text="Tour details"></radTS:Tab>
<radTS:Tab runat="server" Text="Reviews"></radTS:Tab>
<radTS:Tab runat="server" Text="Pricing"></radTS:Tab>
</Tabs>
</radTS:RadTabStrip>
<radTS:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0"
style='BORDER:solid 1px #BBBBBB; width:95%; padding:20px; background-color:#FAFAFA;'>
<radTS:PageView ID="PageView1" runat="server" Width="100%">
<div>
<h3>
<img src="http://pics.10026.com/?src=images/bus.png" style='float:right; margin-left:20px;margin-bottom:10px;' alt='' />
Tour details
</h3>

<ul>
<li class="style4">1 Hour Daintree River Cruise<br />
</li>
<li class="style4">Hand feed kangaroos<br />
</li>
<li class="style4">Lunch at a freshwater creek<br />

</li>
<li class="style4">4WD the "Bloomfield Track"<br />
</li>
<li class="style4">Small & personalised </li>
</ul>
<p class="style14">Your naturalist guide will meet you at your accommodation at around 7am.
The first 1/2 of the journey north is very scenic with beautiful ocean views in contrast with the lush
farmland around Mossman. After morning tea you will learn about the mangrove rainforests, and hopefully
observe local wildlife including the Estuarine Crocodiles on the Daintree River Cruise. </p>

<p class="style14">This tour offers a little more. It takes you beyond Cape Tribulation along the 4WD
only 'Bloomfield Track', allows time for a swim in the Coral Sea at Cape Tribulation (seasonal).
There is no set timetable. You can enjoy elevated walks through the Cape Tribulation National Park
with experienced guides who allow ample time for questions and photographs. While you are taking a swim
in a tranquil freshwater stream the BBQ lunch is prepared then served with home made salads, tropical
fruit and Australian wine. You will probably see fish and turtles in the creek, butterflies and exotic
birds in the trees and often Goannas on the forest floor all at the luncheon site. On the way home enjoy
a short afternoon refreshment stop where you can pat a Kangaroo, scratch a cockatoo, have a cold beer or
sip a cup of local tea. Return to Cairns by 6:30pm. </p>
</div>
</radTS:PageView>
<radTS:PageView ID="PageView2" runat="server" Width="100%">
<div>
<h3>Reviews</h3>
<p><strong>Samantha, 22, Canada</strong>
<img src="http://pics.10026.com/?src=Images/Stars/star_on.png" /><img src="http://pics.10026.com/?src=Images/Stars/star_on.png" /><img
src="http://pics.10026.com/?src=Images/Stars/star_on.png" /><img src="http://pics.10026.com/?src=Images/Stars/star_half.png" /><img src="http://pics.10026.com/?src=Images/Stars/star_off.png" />
</p>
<p>
Our tour guide Geoff was amazing and the size of the group was just right. I would definitely recommend this tour
to backpackers.
</p>
<p>Helpful? <input type="button" value="Yes"/ > <input type="button" value="No"/ ></p>

<p><strong>Keith, 24, Ireland</strong>
<img src="http://pics.10026.com/?src=Images/Stars/star_on.png" /><img src="http://pics.10026.com/?src=Images/Stars/star_on.png" /><img
src="http://pics.10026.com/?src=Images/Stars/star_on.png" /><img src="http://pics.10026.com/?src=Images/Stars/star_on.png" /><img src="http://pics.10026.com/?src=Images/Stars/star_off.png" />
</p>
<p>
I only had two days in cairns, so this tour was perfect for me. If you're looking for a way to pack in as much
as you can in one day this would be the tour for you.</p>
<p>Helpful? <input type="button" value="Yes"/ > <input type="button" value="No"/ ></p>

<p><strong>Felicia, 19, UK</strong>
<img src="http://pics.10026.com/?src=Images/Stars/star_on.png" /><img src="http://pics.10026.com/?src=Images/Stars/star_on.png" /><img
src="http://pics.10026.com/?src=Images/Stars/star_on.png" /><img src="http://pics.10026.com/?src=Images/Stars/star_half.png" /><img src="http://pics.10026.com/?src=Images/Stars/star_off.png" />
</p>
<p>
Make sure you know what the weather is going to be like before you book this tour, it rained the whole time we were
there. But our tour guide made me most of it and was really enternaining.
</p>
<p>Helpful? <input type="button" value="Yes"/ > <input type="button" value="No"/ ></p>

</div>
</radTS:PageView>
<radTS:PageView ID="PageView3" runat="server" Width="100%">
<div>
<h3>Pricing</h3>
<p>All prices shown in Australian Dollars, valid from 1 April 2006 until 31 March 2007</p>
<table width="400" border="0" cellpadding="5" cellspacing="0">
<tr>
<th align="left" ><span class="style15"></span></td>
<th align="center"><span class="style1">Adult</span></td>

<th align="center"><span class="style1">Child</span></td>
<th align="center"><span class="style1">Family</span></td>
</tr>
<tr>
<th align="right"><span class="style1">Safari, Pensioner</span></td>
<td align="center"><span class="style1">$ 135</span></td>
<td align="center"><span class="style1">n/a</span></td>

<td align="center"><span class="style1">n/a</span></td>
</tr>
<tr onmouseover="return escape('Daintree/Cape Tribulation/4WD Bloomfield Track')">
<th align="right"><span class="style1">One Day Safari</span></td>
<td align="center"><span class="style1">$ 145</span></td>
<td align="center"><span class="style1">$ 95</span></td>
<td align="center"><span class="style1">$ 440</span></td>

</tr>
<tr>
<th align="right"><span class="style1">One Day Safari ex Port Douglas</span></td>
<td align="center"><span class="style1">$ 145</span></td>
<td align="center"><span class="style1">$ 95</span></td>
<td align="center"><span class="style1">$ 440</span></td>
</tr>
</table>

</div>
</radTS:PageView>
</radTS:RadMultiPage>

</asp:Panel>


<asp:Panel ID="PanelPopupShortlist" runat="server" style='display:none;' CssClass='Popup'>
<h3>
Trip added!
<asp:Button ID="ButtonPopupShortlistClose" runat="server" Text="Close" style='float:right' />
</h3>
<h4>Your shortlist is as follows:</h4>
<ul>
<asp:Label ID="LabelPopupShortlistDynamic" runat="server" />
</ul>
</asp:Panel>

<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:MyGossipConnectionString %>"
ProviderName="<%$ ConnectionStrings:MyGossipConnectionString.ProviderName %>"
SelectCommand="SELECT [name], [description], [duration], [departs], [price], [no_days], [rating] FROM [Tour] WHERE (([rating] >= @dotnet.itags.org.rating) AND (@dotnet.itags.org.price = 0 OR [price] <= @dotnet.itags.org.price))">
<SelectParameters>
<asp:ControlParameter ControlID="RatingMinRating" DefaultValue="0" Name="rating"
PropertyName="CurrentRating" Type="Decimal" />
<asp:ControlParameter ControlID="TextBoxMaxCost" DefaultValue="0" Name="price"
PropertyName="Text" Type="Decimal" />
</SelectParameters>
</asp:SqlDataSource>

</form>

</body>
</html>

Any help appreciated.

Mike

Hi,

since the code is working on the local environment, it doesn't seem a problem related to the Slider, but instead to the production environment. Please check that all the client files are correctly sent to the browser.


I pointed an HTTP sniffer at requests made to both the local and remote sites, but as far as I can see, the same AXD requests are successfully made both on the local and remote machines. A total of 13 MS Ajax / Atlas control kit files are downloaded from h my test server and the production server:

MS client side library (beginningfunction WebForm_PostBackOptions...)

Hi,

there seems to be a problem with the markup rendered by the extender:

<control id="SliderMaxCost"> <behaviors> <slider:SliderBehavior ... /> </behaviors></control>
This is strange because it should render a textBox element rather than a control (the extender base class takes care of this). Rendering a control means that that the text property is not defined, and it crashes. I'll investigate and follow-up as soon as possible.

Hi,

please check if you' ve got an older version of the Control Toolkit on your production machine. You must have the September release assembly in order to use the Slider extender.


I just file copied the entire project folder structure from the development machine to the production server. The fact that the HTTP sniffer shows the slider behaviour javascript file being downloaded surely indicates that the correct version is installed.

Any other ideas?

Mike


Hi,

it can happen when embedding a new extender in a previous version of the Control Toolkit and then recompiling, for example. However, it seems not your case. I'll continue to investigate.


Thanks for taking the time with this. I simplified the problem and posted it as a new question, which may make your investigations easier:

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

Cheers,

Mike

Compilation Errors

I installed the atlas site template from this location:

http://msdn.microsoft.com/asp.net/info/future/atlastemplate/

I'm working on this tutorial: http://atlas.asp.net/quickstart/atlas/doc/services/default.aspx#simple

and when I compile I get these warnings/errors:

Warning 1 Validation (ASP.Net): Attribute 'EnableScriptComponents' is not a valid attribute of element 'ScriptManager'. C:\Projects\AtlasWebSiteTest\Simple.aspx 6 60 C:\Projects\AtlasWebSiteTest\

Error 2 Validation (Internet Explorer 6): Element 'services' is not supported. C:\Projects\AtlasWebSiteTest\Simple.aspx 7 10 C:\Projects\AtlasWebSiteTest\

Error 3 Element 'ServiceReference' is not a known element. This can occur if there is a compilation error in the Web site. C:\Projects\AtlasWebSiteTest\Simple.aspx 8 20 C:\Projects\AtlasWebSiteTest\

Error 4 Type 'Microsoft.Web.UI.ScriptManager' does not have a public property named 'EnableScriptComponents'. C:\Projects\AtlasWebSiteTest\Simple.aspx 6

I've tried reinstalling the template as well as rebooting to make sure everything was opertating correctly.

Does anyone know why I might be receiving these errors?

Thanks
http://weblogs.asp.net/wallym/archive/2005/12/22/433873.aspx
This might be helpful. I had to update my web.config to get things to work.

Wally

wrote in message news:1149845@.66.129.67.203...
>I installed the atlas site template from this location:
>
> http://msdn.microsoft.com/asp.net/info/future/atlastemplate/
>
> I'm working on this tutorial:
> http://atlas.asp.net/quickstart/atlas/doc/services/default.aspx#simple
>
> and when I compile I get these warnings/errors:
>
> Warning 1 Validation (ASP.Net): Attribute 'EnableScriptComponents'
> is not a valid attribute of element 'ScriptManager'.
> C:\Projects\AtlasWebSiteTest\Simple.aspx 6 60
> C:\Projects\AtlasWebSiteTest\
>
> Error 2 Validation (Internet Explorer 6): Element 'services' is not
> supported. C:\Projects\AtlasWebSiteTest\Simple.aspx 7 10
> C:\Projects\AtlasWebSiteTest\
>
> Error 3 Element 'ServiceReference' is not a known element. This can
> occur if there is a compilation error in the Web site.
> C:\Projects\AtlasWebSiteTest\Simple.aspx 8 20
> C:\Projects\AtlasWebSiteTest\
>
> Error 4 Type 'Microsoft.Web.UI.ScriptManager' does not have a public
> property named 'EnableScriptComponents'.
> C:\Projects\AtlasWebSiteTest\Simple.aspx 6
>
> I've tried reinstalling the template as well as rebooting to make sure
> everything was opertating correctly.
>
> Does anyone know why I might be receiving these errors?
>
> Thanks
>

What changes do you recommend that i make? What did you do to get it running?

Thanks!


I think you don't have the December release. Try downloading it again.
I had to go back and delete the old files. Re install the new ones. It still didnt work.

Then I shut everything down, deleted the files. Rebooted, reinstalled the files and then started VS.NET 2005 and it worked finally.

Thanks for the help. It baffles me why the application was acting like this.

Thanks again!
I am sure that I am missing something obvious, but I cannot get this demo to work.

In case it matters, I am working with Windows 2003 Server (SP1) and VS2005. I have also tried the same thing under Windows XP (SP2). When I click the button in IE 6, I get the JScript error pop-up window with the following message:

"'Quickstart' is undefined"

Has anyone else encountered this problem? If so, did you find a solution? I am sure that it is going to be a "head slap" type of answer, but I cannot figure it out for the life of me.

Thanks,
Jim.
Okay, after checking my system again, I realized that I had not installed the December release. I could have sworn that I had, but once I installed the December release and created a new website using the Atlas Templates, the JScript error message went away.

Thanks,
Jim.