Showing posts with label sample. Show all posts
Showing posts with label sample. Show all posts

Wednesday, March 28, 2012

Very slow and unresponsive AJAX (Calendar + Tabs)

i just installed the toolkit into Visual Studio 2005, and managed to create some sample projects

I've implemented the Tabs and Calendar onto an existing project, in the believe that Ajax would provide faster (or as fast) access then the existing solution.

in order to make the Ajax work in the project, I've copied nearly all needed elements into the web.config ( http://codebetter.com/blogs/jay.kimble/archive/2006/10/26/How-To_3A00_-Enable-Microsoft-Ajax-Beta-over-on-an-existing-site.aspx )

now - the Ajax Calendar and Tabs works, the old server side asp.net have been fitted to the new controls...

but very very slow !?!? - the calendar takes 3-4 seconds to show and a single action in it takes 1-2 seconds ?

code:

1<%@dotnet.itags.org. Control Language='vb' AutoEventWireup='false' Codebehind='ctlQuizEdit.ascx.vb'2 Inherits='SurveyFactory.ctlQuizEdit' TargetSchema='http://schemas.microsoft.com/intellisense/ie3-2nav3-0' %>3<%@dotnet.itags.org. Register TagPrefix='fcke' TagName='FckHeader' src='ctlImportDefLangHeader.ascx' %>4<%@dotnet.itags.org. Register TagPrefix='fcke' TagName='FckFooter' src='ctlImportDefLangFooter.ascx' %>5<%@dotnet.itags.org. Register TagPrefix='cc1' TagName='HeaderFooter' src='ctlHeaderFooter.ascx' %>6<%@dotnet.itags.org. Register TagPrefix="cc1" Namespace="AjaxControlToolkit" Assembly="AjaxControlToolkit" %>789<cc1:TabContainer Height="250px" Width="600px" ID="TabContainer1" runat="server">10 <cc1:TabPanel ID="TabPanel1" runat="server" HeaderText="Survey">11 <ContentTemplate>12 <table id="editQuizData" runat="server" width="100%" cellspacing="1" cellpadding="2" border="0" height="10">13 <tr>14 <td align="left" colspan="2">15 <asp:Label ID="lblQuizAction" Text="Edit" Font-Bold="True" runat="server" /><br>16 <asp:Label ID="lblError" runat="server" />17 </td>18 </tr>19 <tr>20 <td align="left">Title</td>21 <td align="left"><asp:TextBox ID="txtQuizTitle" Columns="80" runat="server"></asp:TextBox></td>22 </tr>23 <tr>24 <td align="left">Description</td>25 <td align="left"><asp:TextBox ID="txtQuizDescription" Columns="80" Rows="2" TextMode="MultiLine" runat="server"></asp:TextBox>26 </td>27 </tr>28 <tr>29 <td align="left">Created by</td>30 <td align="left"><asp:Label ID="lblCreatedBy" runat="server" />31 </td>32 </tr>33 <tr>34 <td align="left" valign="top">Interval</td>35 <td align="left">36 <table id="Table1" runat="server" width="100%" cellpadding="0" cellspacing="0" border="0">37 <tr>38 <td align="left" valign="top">From</td>39 <td align="left" valign="top">To</td>40 </tr>41 <tr>42 <td align="left">43 <asp:TextBox ID="CalendarQuizFrom" runat="server"></asp:TextBox>44 <cc1:CalendarExtender ID="CalendarExtender1" runat="server"45 TargetControlID="CalendarQuizFrom" Format="dd-MM-yyyy" />46 </td>47 <td align="left">48 <asp:TextBox ID="CalendarQuizTo" runat="server"></asp:TextBox>49 <cc1:CalendarExtender ID="CalendarExtender2" runat="server"50 TargetControlID="CalendarQuizTo" Format="dd-MM-yyyy" />51 </td>52 </tr>53 </table>54 </td>55 </tr>56 </table>57 </ContentTemplate>58 </cc1:TabPanel>59 <cc1:TabPanel ID="TabPanel2" runat="server" HeaderText="Header">60 <ContentTemplate>61 <fcke:FckHeader runat="server" ID="FckHeader" />62 </ContentTemplate>63 </cc1:TabPanel>64 <cc1:TabPanel ID="TabPanel3" runat="server" HeaderText="Footer">65 <ContentTemplate>66 <fcke:FckFooter runat="server" ID="FckFooter" />67 </ContentTemplate>68 </cc1:TabPanel>69</cc1:TabContainer>7071<center>72 <asp:Button ID="btnSave" runat="server" Text="Save"></asp:Button> 73 <asp:Button ID="btnCancel" runat="server" Text="Cancel"></asp:Button>74</center>7576<input id="hiddenLangHeaderTxt" type="hidden" name="hiddenLangHeaderTxt">77<input id="hiddenLangFooterTxt" type="hidden" name="hiddenLangFooterTxt">78<input id="hiddenFooter" type="hidden" name="hiddenFooter" runat="server">79<input id="hiddenHeader" type="hidden" name="hiddenHeader" runat="server">80

Hi Montago,

Your program works pretty well after I removed all the UserControls. So we suggest that you should use an exclusive method that remove the controls one by one until find out the exact root cause. Also, Some helpful debugging tools will make your work easy. For example,IE WebDevelopment Helper,HttpWatch,Firebug etc.

If your problem cannot be resolved , please let me know with more information.

Best regards,

Joanthan

Virtual keyboard

Hello,

I'm wondering if AJAX has sample or thread about popup/virtual keyboard? I am trying to use it on a touchscreen project. Thanks for any suggestions.

RO

Hi,

Here is link to related article:

http://www.codeproject.com/jscript/jvk.asp

I hope this helps


Im not sure why you would need asynchronomous javascript for a virtual keyboard, were you just using AJAX synonymously to javascript? This can help either way.

http://www.codeproject.com/jscript/jvk.asp

I just posted and was beaten! LOL.. Hate it when that happens, but thats why there is a duplicate answer here.


Great, thanks mystery!

Monday, March 26, 2012

visual web developer 2005 express

Hi,

will the sample control toolkit work in visual web develoer? i installed the ajax .net rc1, control sample web site, latest ctp. When i open and run the sample project, it shows no error and displays the controls. but, the none of the controls is working.

thanks

it will work under visual web developer

do you see any javascript error?


No. there is no compilation, runtime or javascript error. But, it the sample controls still not working

thanks

VS 2005 IDE now unstable and crashing

I recently installed AJAX and the control toolkit, setup a sample website and it worked very slick. I have an existing app written in VB.net in VS 2005 that i am integrating the AJAX toolkit, specifically the dropdownshadow extender, scriptmanager and updatepanel, having copied the needed configuration into my web.config from the small app i wrote.

The problem is my environment is now extremenly unstable and crashes whenever i try to change a property of a control within the update panel or on any page containing an ajax control. Simply clicking on a textbox within the AJAX control will randomly cause an error screen i have never seen before saying Visual Studio has encountered an error and must restart.

Once the crash happens i cannot switch to design view as it says no AJAX tags are recognized, yet if i compile and run it works fine, not much help if i cannot design tho. I strip the tags out in code view and i am off again until the next crash.

After some crashes i try to drag an AJAX control onto a page and i get an 'Error: control could not be created' , control is not recognized. I have to reboot my system to get it to work.

I installed SP1 Beta and the problem still persists. This is very frustrating as the controls are working great other than when they crash my IDE. I will attach a screenshot if needed once i get in front of my dev station.

Hopefully someone has had this problem already.

Cheers!! And great work so far!!

I have never seen that, but can be a bug fixed in the new SP1 for VS2005http://alpascual.com/blog/al/archive/2006/12/15/Visual-Studio-2005-Service-Pack-1-has-been-released.aspx

See if installing it fixes your problems


This happens to me much more often as well after installing AJAX.

Sorry been away for a while, i installed SP1 but still unstable. I also constantly get

Error 182 Element 'ScriptManager' is not a known element. This can occur if there is a compilation error in the Web site.

It does not occur everytime but when it does i cannot change to design view. The site still runs fine but it is frustrating that i have to reboot or wait for the 'magic' in the air to sort the problem out. I have seen this in many forums but no one ever has an answer yet.


VS2005 often crashes when I try to shut it down with SP1 and SP1 for Vista. I get memory corrupt errors and it can't recognize the ASP.NET Ajax tags most of the time. I am running Vista x64 RC1 though so some problems could be related to that...

Saturday, March 24, 2012

Want to use context menu with atlas

Hello,

I want to use this context menu sample (http://msdn.microsoft.com/msdnmag/issues/05/02/CuttingEdge/) within atlas.

I dont understand why i get an unknown error when i use it in an update panel.

Can anyone help me ?

thanks a lot

When I get this error in an UpdatePanel, comment out the UpdatePanel lines so I'm just left with the Content and then run it. I'll see a server-side exception then.

<%--<atlas:UpdatePanel runat="server" id="up_test" Mode="Conditional" RenderMode="inline">
<ContentTemplate>--%>
<cc1:ContextMenu />
<%--</ContentTemplate>
</atlas:UpdatePanel>--%>


Hello,

you must have a config error because for me it works

Thanks

WCF AJAX Enabled Service and looping through Dictionary<string,string>

I hope someone can help me on this. I've tried every sample and cant seem to figure it out. I'm returning a Dictionary<string,string> from a WCF Service using Visual 2008 with .Net 3.5.

public Dictionary<string, string> RetrieveNavigationStylesLists()
{
Dicationary<string,string> data = null;

...

data = new Dictionary<string, string>();
data.Add("StyleID", styles[loop][0].ToString());
data.Add("Style", styles[loop][1].ToString());
data.Add("Default", styles[loop][2].ToString());

return data;

}

in my javascript i've tried the following:

...
// WCF Service is invoked an on success calls the function below

function onNavigationSuccess(args)
{
for(var data in args)
{
var key = data;
var keyValue = args[data];

}
}

But when i loop through the data i get only

loop 1:
key = 0
keyValue =
-key = "StyleID"
-value = "2"

loop 2:
key = 1
keyValue =
-key = "Style"
- value = "Page Title"

I cant seem to get the key name or the key value

If i look at args is contains the following data:

args = [0]
which has key="StyleID" and value="2"
[1]
which has key="Style" and value="Page Title"
[2]
which has key="Default" and value="False"

I've tried every sample that is available but cant seem to get it to work

Thanks




check this hope it helpshttp://wiki.freaks-unidos.net/javascript-libraries

Wednesday, March 21, 2012

WCF Service Library

Can someone point me to links with sample code (preferably C#) where I can learn on developing WCF Service Library. I want to integrate my other projects that have my objects into the WCF Service Library project. Also I would like to know where I can learn more on best practices on how to develop .Net 3.5 applications using the service architecture and ajax.

Thanks

No one doing WCF?


Hi,

You can refer tothis documentto get start with WCF.