Showing posts with label created. Show all posts
Showing posts with label created. Show all posts

Wednesday, March 28, 2012

control cannot be created because Visual Studio Cannot find the Controls type in the Contr

Hi Friends, I have installed Visual Studion 2005 on my machine. After creating an AJAX FutureRelese Web project. I tried to add Future Release Controls to my web page. I am getting the following error "control cannot be created because Visual Studio Cannot find the Controls type in the Control Assembly" Could you please get back to me with the solution for this. Thanks and Regards, Baburaj P V

Pls make sure you have System.Web.Extensions referenced. If Not Add it from the Reference Dialog, it is insalled in the GAC. If you also have the previous version then you have to modify the web.config.


It would be greatful, if I could know how to modify the Web.Conf. I have installed ASPDOTNETFutureRelease on Dot Net Fwk 2.0

Best Regards,

Babz


Try adding another entry for System.web.extensions for AJAX controls and prefix it in the control creation in web forms

control cannot be created because visual studio cannot find the controls type in the contr

Just installed Ajax extensions and ajax control toolkit for Vs2005.All fine.

I can drag drop update panel or script manager.

But if I do so with ajax toolkit controls I get a a error as : "control cannot be created because visual studio cannot find the control's type in the control assembly".

I have downloaded and worked with the toolkit at my home comp and it works all fine. But here at my work its giving me this problem.

I googled up to see any solutions but dint find much help!!

So any help with this would be appreciated!! Thanks!!


Hey guys!!

Anyone for the solution??


Did you remember to register it in the GAC? On your work PC, it may not have done that automagically.


Hey thanks for that.

It did work out.

Strange I have added toolkit on couple of PC's and never saw this error.

Just added the Dll to Gac and the problem is solved on my box.

Thanks.

Content Page Problem

Hi;

I have a masterpage with a script manager and a collapse panel.

It works fine but the Content page I created containing an update panel for a grid just ignores the atlas updatepanel.

If I remove the association with the master page and add a script manger the updatepanel works fine.

I can't seem to find the problem, can anyone give me some guidance on this problem?

Thanks

Without much to go on, I'd guess that you might need to use aScriptManagerProxy.


I tried a script manager proxy it didn't help, but I was unsure of what needed to be set also I am only using the basic implementation of the updatepanel and not using any additional scripts. It seems that the master isn't communicating properly with the content page.

Here is the part of the master with the scriptmanager:

<%@.MasterLanguage="VB"CodeFile="HypnosMasterPage.master.vb"Inherits="HypnosMasterPage" %>

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

<!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>Untitled Page</title>

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

</head>

<body>

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

Here is the pertinent part of contentpage: Also it is in a subfolder one level below the location of the master page

<%@.PageLanguage="VB"MasterPageFile="~/HypnosMasterPage.master"AutoEventWireup="false"CodeFile="UserLookup.aspx.cs"Inherits="UserLookup"Title="UserLookup" %>

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

<asp:ContentID="Content1"ContentPlaceHolderID="ContentPlaceHolder1"Runat="Server">

<atlas:UpdatePanelID="UpdatePanel1"runat="server"Mode="Conditional">

<ContentTemplate>

<asp:GridViewrunat="server"ID="grid"></asp:GridView>

</ContentTemplate>

<Triggers>

<atlas:ControlEventTriggerControlID="btnGo"EventName="Click"/>

<atlas:ControlEventTriggerControlID="txtPatientSearch"EventName="TextChanged"/>

</Triggers>

</atlas:UpdatePanel>

Any thoughts?

Len


When I looked at the html again I found my own problem missing enable attribute, sorry to take up your time thanks for the tips.

Len

connection to Web Service Refused

I created a simple webservice on my local system. I then created the proxy on the command line (Services.cs).
I wrote a Console App to use the webservices. Added a reference to System.Web.Services And did a right click Add --> Existing Item --> Services.cs

Anonymous Access is set on IIS.

The failure I get is:
Unhandled Exception: System.Net.WebException: Unable to connect to the remote server --> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it.

I tried setting (in the WebService) Dynamic Port to false. After I did this, it worked the first time, but since then has the same error as above.

OS: Windows XP Pro

Any thoughts would be appreciated.

Thanks, Jason

It might be worth while posting this in the Web services or WCF forums

.NET 2.0 ASMX Web Services: http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=46&SiteID=1

WCF: http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=118&SiteID=1


Thanks, i will do that.

J

Monday, March 26, 2012

Connect AnimationExtender at runtime

Hi,

I have created a page with a datalist that has a button and a image inside the itemtemplate. So what I trying to do is to connect the animationextender with the button (targetid) at runtime, wich does not work at all. Is it possible to connect (set target id) at runtime or must it be done in designtime?

//CC

Hi TCNC,

The Animation Framework has a n undocumented feature wherein any attribute assigned to the AnimationExtender is evaluated at runtime .

You can use it by suffixing the Attribute with the Attribute "Script"

EX: < ajaxToolkit:AnimationExtender Blah>

<OnClick>

<Resize Height="200" width="200" AnimationTargetScript="getTargetElement();" />

</OnClick>

</ajaxToolkit:AnimationExtender>

<script language="Javascript">

function getTargetElement(){

return someelementID;

}

</script>

This will cause the function getTargetElement to be called whenever the Animation is played.

You can probably set the ID of the Element to be animated in a hidden field.

In the Function "getTargetElement" read the HiddenField and return its value.

When the Animation plays , the target is automatically changed.

Hope this helps.

And if it resolves the issue , Please mark my reply as the answer

ConfirmButtonExtender Doubt

Hi Pals,

Help me to solve this problem in creating sample atlas control helloworld site

1.i have created new tab & placed the atlascontroltoolkit dll in the toolbox

2.i am trying the use confirmbuttonextender control available in the atlascontroltoolkit dll

3.i darg asp.net server control button in the webform

4.Now when see the properties of the button,confirmbuttonextender is available,but when i click plus on that confirmbuttonextender property,i was not apple to get the confirmtext property.

Thank & Regards,

Ram

This is a known issue. You can either do the hookup in the ASPX code or you can download a newer build of the AtlasControlTookit fromhttp://www.codeplex.com

ConfirmButtonExtender and ModalPopupExtende "ScriptLoader is already loading scripts." Pro

I created the following GridView

<asp:UpdatePanel ID="ProductsListUpdatePanel" runat="server">
<ContentTemplate>
<asp:ObjectDataSource ID="ProductsObjectDataSource" runat="server" SelectMethod="GetAllProducts"
TypeName="ProductsDataSource"></asp:ObjectDataSource>
<asp:Panel ID="pnl_Confirm" runat="server" Style="display: none" CssClass="ModalPopup">
Are you sure?<br />
<br />
<asp:Button ID="btnOk" runat="server" Text="UsuĊ„" />
<asp:Button ID="btnCancel" runat="server" Text="Anuluj" />
</asp:Panel>
<asp:GridView ID="ProductsGridView" runat="server" DataSourceID="ProductsObjectDataSource"
DataKeyNames="Id" AutoGenerateColumns="False" CssClass="Grid" OnRowDataBound="ProductsGridView_RowDataBound1"
OnRowCommand="ProductsGridView_RowCommand">
<Columns>
<asp:BoundField DataField="ProductPFK" HeaderText="ProductPFK" Visible="False" />
<asp:TemplateField ShowHeader="False">
<ItemTemplate>
<asp:ImageButton ID="EditImageButton" runat="server" CausesValidation="False" CommandName="Edit"
ImageUrl="~/CSS/Pictures/edit.GIF" Text="Edit" />
<asp:ImageButton ID="DeleteImageButton" runat="server" CausesValidation="False" CommandName="Delete"
ImageUrl="~/CSS/Pictures/delete.GIF" Text="Delete" />
<ajaxtoolkit:ConfirmButtonExtender ID="ext_confirm_Delete" runat="server" TargetControlID="DeleteImageButton"
DisplayModalPopupID="ext_Modal_Delete">
</ajaxtoolkit:ConfirmButtonExtender>
<ajaxtoolkit:ModalPopupExtender ID="ext_Modal_Delete" runat="server" TargetControlID="DeleteImageButton"
PopupControlID="pnl_Confirm" CancelControlID="btnCancel" BackgroundCssClass="ModalBackground"
OkControlID="btnOk">
</ajaxtoolkit:ModalPopupExtender>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Name">
<ItemTemplate>
<asp:ImageButton ID="RollButton" runat="server" CausesValidation="False" CommandName="RollDown"
ImageUrl="~/CSS/Pictures/plus.GIF" Text="Button" CommandArgument='<%# Eval("Id") %>'
Visible="false" />
<asp:Label ID="ItemName" runat="server"><%# Eval("Name") %></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="Operator" HeaderText="Agragacja" />
<asp:CheckBoxField DataField="OwnNeeds" HeaderText="W?asne potrzeby" />
</Columns>
<HeaderStyle CssClass="GridHeader" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>

When I click the RollButton new rows apears in the GridView. When the page is rendering, ConfirmButtonExtender and ModalPopupExtenderare loading I can still click some other buttons like DeleteImageButton button. Then I get the error:

Microsoft JScript runtime error: Sys.InvalidOperationException:
ScriptLoader.loadScripts cannot be called while the ScriptLoader is already
loading scripts.

What is the comprehensive sollution of this problem?

I tried to use the UpdateProgress control but I couldn't create such <div> and CSS that would cover the whole page (in IE6).

It also takes some time to render the whole ModalPanel for many rows. I belive that there is any method to do it faster.

Any solution is really welcome.

Hi W.kiermasz,

It is not an effiecient way to add AJAX Controls to each ItemTemplate. If you insist on your method, I suggest that you should use a div convered all the screen when page is loading. Meanwhile, add another javascript which will detect whether the last AJAX control is prepared or not by using typeof($find("AJAX Control's BehavavoirID")). If the last one prepared, hide the top div and show the GridView. Here is the sample which shows how to use only one ModalPopupExtender in a GridView.

<%@. Page Language="C#" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script runat="server"> protected void Page_Load(object sender, EventArgs e) { //Attach a Javascript funtion to the LinkButton. LinkButton myLinkButton; for (int i = 0; i < GridView1.Rows.Count; i++) { myLinkButton = (LinkButton)GridView1.Rows[i].Cells[4].FindControl("LinkButton1"); myLinkButton.Attributes.Add("onclick", "shopModalPopup('" + GridView1.Rows[i].Cells[0].Text + "');return false;"); } } protected void SqlDataSource1_Selecting(object sender, SqlDataSourceSelectingEventArgs e) { string text = e.Command.CommandText.ToString(); }</script><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title>Untitled Page</title> <style> .modalBackground { background-color:Gray; filter:alpha(opacity=70); opacity:0.7; } .modalPopup { background-color:#FFD9D5; border-width:3px; border-style:solid; border-color:Gray; padding:3px; width:250px; } </style></head><body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="EmployeeID" DataSourceID="SqlDataSource1"> <Columns> <asp:BoundField DataField="EmployeeID" HeaderText="EmployeeID" InsertVisible="False" ReadOnly="True" SortExpression="EmployeeID" ItemStyle-Width="0" /> <asp:BoundField DataField="LastName" HeaderText="LastName" SortExpression="LastName" /> <asp:BoundField DataField="FirstName" HeaderText="FirstName" SortExpression="FirstName" /> <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" /> <asp:TemplateField> <ItemTemplate> <asp:LinkButton ID="LinkButton1" runat="server">Click On Me</asp:LinkButton> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NORTHWNDConnectionString%>" SelectCommand="SELECT [EmployeeID], [LastName], [FirstName], [Title] FROM [Employees]" onselecting="SqlDataSource1_Selecting"> </asp:SqlDataSource> <asp:Panel ID="Panel1" runat="server" CssClass="modalPopup" Height="200px" Width="300px" style="display:none"> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> EmployeeID:<asp:TextBox ID="tbEmployeeID" runat="server"></asp:TextBox> <br/> Reason:<asp:TextBox ID="tbReason" runat="server"></asp:TextBox> </ContentTemplate> </asp:UpdatePanel> <asp:Button ID="btnCancel" runat="server" Text="Cancel" /> </asp:Panel> <div style="display: none"> <asp:Button ID="Button1" runat="server" Text="Button" /></div> <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="Button1" PopupControlID="Panel1" CancelControlID="btnCancel" BackgroundCssClass="modalBackground"> </ajaxToolkit:ModalPopupExtender> <script type="text/javascript" language="javascript">function shopModalPopup(employeeID){ //show the ModalPopupExtender $get("<%=tbEmployeeID.ClientID%>").value = employeeID; $get("<%=tbReason.ClientID%>").value =""; $find("<%=ModalPopupExtender1.ClientID%>").show(); } </script> </form></body></html>
I hope this help.
Best regards,
Jonathan

Saturday, March 24, 2012

Confirm Button Extension with Wizard buttons?

Hi

I would like to use the AJAX confirm button extension, but I am trying to attach it to the "FinishButton" that is automatically created with the ASP Wizard.

So in a nutshell when a user clicks the "finish" button in my wizard a message box will pop up asking the user if they are sure they would like to continue.

I'm using VWD2005 express and scripting in visual C#.

Please can someone help me out or point me in the right direction?

Cheers!!!

Hi

I managed to solve this one! Woooohoooo.

If anyone is interested then here's my ASP. You need to put the button extended inside the Finish Navigation Template itself.

<FinishNavigationTemplate>

<cc1:ConfirmButtonExtenderID="ConfirmButtonExtender1"runat="server"TargetControlID="FinishCompleteButton"ConfirmText="Are you sure you want to place this order?">

</cc1:ConfirmButtonExtender>

<asp:ButtonID="FinishPreviousButton"runat="server"Text="Previous"CommandName="MovePrevious"/>

<asp:ButtonID="FinishCompleteButton"runat="server"Text="Finish"OnClientClick="Wizard1_FinishButtonClick"CommandName="MoveComplete"/>

<asp:ButtonID="CancelButton"runat="server"Text="Cancel"CommandName="Cancel"/>

</FinishNavigationTemplate>

Configuration Error - buildProviders

Hello!

I've just installed VWD 2005 Express and Atlas. So, I created a new "Atlas" web site, created a label, but when I tested the page I've got a "Configuration Error"Crying ??

I've used all the default settings...

Here is the whole error:

Configuration Error

Description:Anerror occurred during the processing of a configuration file requiredto service this request. Please review the specific error details belowand 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="false">
Line 65: <buildProviders>
Line 66: <add extension=".asbx" type="Microsoft.Web.Services.BridgeBuildProvider" />
Line 67: </buildProviders>


Source File: c:\inetpub\wwwroot\teste\web.config Line: 65

I'm a newbie on ASP.NET, so I can't realize what's wrong. And I'm very surprised, cause I've used all the default configurations...

And yes, I've associated the ".asbx" extension in IIS on the instalation of "Atlas"...

I'm usingWin XP Pro

bye,
thx 4 all
An observation:

This error occur when I open the browser and type "http://localhost/teste"
But when I press Ctrl+F5 in VWD it worksTongue Tied

Wednesday, March 21, 2012

Composite control with updatepanel for drag and drop

I'm trying to create a composite control with an updatepanel on it that contains an area with dropzones and draggables.

I have created the following controls:

- DragDropUpdatePanel (the control with the UpdatePanel on it)

- UpdatePanelTemplate (the contenttemplate for the updatepanel)
- contains a placeholder for the dropzones and a linkbutton to force an update

- Dropzone that implements IScriptControl

- Draggable that implements IScriptControl

- Loader, an example from another thread to update the updatepanel after a postback.


The DragDropUpdatePanel will create all dropzones and draggables in the DataBind function. This all works ok until i drop a draggable on a dropzone.
Ondrop is performing the click event of the linkbutton that will execute the DataBind method and refreshes the Updatepanel.

The result looks ok but the dropzone is always disposed and i get an and error when i try to move a draggable item.

I have created a demo that you candownload here.

Hopefully someone can explain to me what I am doing wrong.

Thanks Willem.

struggeling with it but still no result ... could someone help me out here?

thanks


got it fixed ..Big Smile .. wrote an extender for the dropzone and based myself on the dropwatcherbehavior.js file from the ReorderList control in the atlascontrol toolkit.

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.