AJAX :: Code Jump Into Disassembly Looking For Toolkit File
Jul 15, 2010
I've been dealing with an AJAX issue for some time now and I can't seem to find an answer anywhere. When I'm debugging and stepping thru my code it will jump into disassembly looking for a toolkit file. If I fit f5 I can continue debugging, but this happens often.
The latest one is:
Address: AjaxControlToolkit.ExtenderControlBase.ExtenderControlBase()
--- c:UsersswaltherprojectsaspNetAjaxReleases30930AjaxControlToolkitSourceAjaxControlToolkitExtenderBaseExtenderControlBase.cs
I setup the toolkit by adding a reference to AjaxControlToolkit.dll There's a line at the beginning of the markup...and everything appears to work outside of the debug issue.
[Code]....
View 2 Replies
Jun 9, 2010
I am using quite a few AJAX toolkit extenders e.g. RoudnedCorners extender, Watermark extender, etc. in my webpage. The problem is that these extendersadd a lot of script code to my webpage causing performance issue. Also, the presence of these extenders works against search engine as the actual content gets pushed down the page, thereby being risked skipped by search engines.
Is there any way where I can move these AJAX control extenders and/or their generated scripts to a different file ?
View 2 Replies
Jul 8, 2010
Recently, I downloaded the source code (not Binaries) of latest AJAX toolkit and introduced some changes in Calendar extender. Now, I would like to build the DLL out of it so that I can add it to my project and use it. Now, when I am trying to build DLL, it fails. It never compiles for me. Infact, I am not sure which project/application file exactly do I need to run.
Every-time, I try to open any Solution/Project, I get exceptions either for some missing files or folders. I have both VS 2005 Pro and VS 2008 Express Edition installed. I need the libraries to be compatible with Framework 3.5.
View 2 Replies
Jan 24, 2011
I am using following server side code to save the data from ASP.NET Control toolkit Editor to the database It follows with the HTML Code The problem is that, data is saved successfully. But it is saved twice. Main problem is this server side event is fired twice. How can i prevent it from firing twice?
Server side code
Imports System.Data.SqlClient
Partial Class Administrator_Calendar
Inherits System.Web.UI.Page
Protected Sub BtnAdd_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnAdd.Click
Try
Dim dbobj As New db
Dim i As Integer = 0
Dim rdr As SqlDataReader = dbobj.selectQuery("select max(srno) from calendar")
If rdr.HasRows = True Then
rdr.Read()
i = rdr.Item(0)
End If
rdr.Close()
dbobj.insertQuery("insert into calendar values (" & i + 1 & " , '" & Me.Txt_dt.Text & "' , '" & Me.Editor1.Content & "')")
dbobj = Nothing
Catch ex As Exception
End Try
End Sub
End Class
HTML CODE
<%@ Page Language="VB" MasterPageFile="~/MasterPages/Admin_AftrLogin.master" AutoEventWireup="false"
CodeFile="Calendar.aspx.vb" Inherits="Administrator_Calendar" Title="Excel Crop Care Ltd. / Administration Section / Manage Calendar..." %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit.HTMLEditor"
TagPrefix="cc2" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server">
<div>
<cc1:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0">
<cc1:TabPanel runat="server" HeaderText="Selected Dates" ID="TabPanel1">
<ContentTemplate>
<asp:GridView ID="Gridview1" runat="server" AutoGenerateColumns="False" DataKeyNames="srno"
DataSourceID="SqlDataSource1">
<Columns>
<asp:CommandField ShowDeleteButton="True" ShowEditButton="True" ShowInsertButton="True">
<ItemStyle Width="20%" />
</asp:CommandField>
<asp:BoundField DataField="srno" HeaderText="No." ReadOnly="True" SortExpression="srno">
<ItemStyle Width="10%" />
</asp:BoundField>
<asp:BoundField DataField="date" HeaderText="Date" SortExpression="date">
<ItemStyle Width="30%" />
</asp:BoundField>
<asp:BoundField DataField="description" HeaderText="Description" SortExpression="description" />
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:DataConnectionString %>"
SelectCommand="SELECT * FROM [calendar]" UpdateCommand="Update calendar set date=@date,description=@description where srno=@srno"
DeleteCommand="Delete from calendar where srno=@srno"></asp:SqlDataSource>
</ContentTemplate>
</cc1:TabPanel>
<cc1:TabPanel ID="TabPanel2" runat="server" HeaderText="Add New">
<ContentTemplate>
<table>
<tr>
<td width="30%">
Date :
</td>
<td>
<asp:TextBox ID="Txt_dt" runat="server" Height="16px" Width="170px" CausesValidation="True"
Font-Names="Verdana" ForeColor="#666666"></asp:TextBox>
<asp:ImageButton runat="Server" ID="Image1" ImageUrl="../Images/Calendar_scheduleHS.png"
AlternateText="Click to show calendar" /><br />
<cc1:CalendarExtender ID="Txt_dt_CalendarExtender" runat="server" DaysModeTitleFormat="dd/MM/yy"
Enabled="True" Format="dd/MM/yy" TargetControlID="Txt_dt" PopupButtonID="Image1">
</cc1:CalendarExtender>
<cc1:TextBoxWatermarkExtender ID="Txt_dt_TextBoxWatermarkExtender" runat="server"
Enabled="True" TargetControlID="Txt_dt" WatermarkText="DD/MM/YY">
</cc1:TextBoxWatermarkExtender>
<cc1:MaskedEditExtender ID="Txt_dt_MaskedEditExtender" runat="server" MaskType="Date"
CultureDateFormat="dd/MM/yy" Enabled="True" TargetControlID="Txt_dt" Century="2000"
UserDateFormat="DayMonthYear" Mask="99/99/99">
</cc1:MaskedEditExtender>
</td>
</tr>
<tr>
<td colspan="2">
<asp:Label ID="Lbl_msg" runat="server" Text="Enter description in the editor below :"></asp:Label>
</td>
</tr>
<tr>
<td colspan="2">
<cc2:Editor ID="Editor1" runat="server" Height="350px" />
</td>
</tr>
<tr>
<td colspan="2" align="center">
<asp:Button ID="BtnAdd" runat="server" Text="Add" OnClick="BtnAdd_Click" Width="75px"
CssClass="btn" />
<asp:Button ID="Btn_Rem" runat="server" Text="Remove" OnClick="BtnAdd_Click" Width="75px"
CssClass="btn" />
</td>
</tr>
</table>
</ContentTemplate>
</cc1:TabPanel>
</cc1:TabContainer>
</div>
</asp:Content>
View 1 Replies
Mar 9, 2011
I have a GridView control inside one Update Panel and a detail section inside another Update Panel. Initially, the detail section is hidden and when a GridView row is selected, the Detail panel becomes visible. Everything works fine except that if the GridView contains more rows and covers most of the user's screen, screen doesn't shits to the start of Detail section.I can use anchor but was just wondering if there is any other way of achieving this. Also the Detail section has multiple nested Update Panels and if I use anchor, then any of the child Update Panel's update will move the screen to the beginning of the detail Section.
View 4 Replies
Feb 22, 2010
I'm trying to use the AsyncFileUpload control from the Asp.net Ajax Control Toolkit (Sept 30, 2009 stable build: 30930) . I've created a demo application and the control works fine. Files upload and all is well. When I try to use the control in my real application, I'm always receiving an error stating "The file attached is invalid". The AsyncFileUpload control returns this when the file uploaded is null.
To isolate the problem, I created a new master page exactly like the master page in my demo app. I also created an aspx page exactly like the page in my demo app. The upload still fails with a "The file attached is invalid" error. I also compared the web.config for the real app and the demo app and couldn't identify any differences that should matter. The code below is the test code in my real app. This code is exactly the same as the functioning code in the demo app with the exception of having different class names and file names. The web.config listed below is from the real app with the appsettings and connectionstrings removed. Real App Test Master Page:
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="aaaMasterPage.master.cs" Inherits="L1Admin.aaaMasterPage" %>
<!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>
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<asp:ContentPlaceHolder id="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="scriptManager" EnablePartialRendering="true" runat="server" AsyncPostBackTimeout="180" />
<div>
<asp:ContentPlaceHolder id="content" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>
Test Page:
<%@ Page Language="C#" MasterPageFile="~/aaaMasterPage.master" AutoEventWireup="true" CodeFile="aaaFileUploadTest2.aspx.cs" Inherits="aaaFileUploadTest2" Title="Untitled Page" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<script type="text/javascript">
function pageLoad(sender, args) {
}
function startUpload(sender,args)
{
$('#uploadMessage p').html();
$('#uploadMessage').hide();
}
function uploadComplete(sender,args)
{
showUploadMessage(args.get_fileName() + " uploaded succesfully - " + + args.get_length() + " bytes", '');
}
function uploadError(sender, args)
{
showUploadMessage("An error occurred during uploading. " + args.get_errorMessage(), '#ff0000');
}
function showUploadMessage(text, color)
{
$('#uploadMessage p').html(text).css('color', color);
$('#uploadMessage').show();
}
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="content" Runat="Server">
<div id="uploadMessage"><p></p></div>
<ajax:AsyncFileUpload ID="pageBannerUpload"
CssClass="file_upload"
OnClientUploadError="uploadError"
OnClientUploadStarted="startUpload"
OnClientUploadComplete="uploadComplete"
onuploadedcomplete="upload_UploadedComplete"
runat="server" />
</asp:Content>
Real App Test Page Code Behind:
using System;
using System.IO;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
public partial class aaaFileUploadTest2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void upload_UploadedComplete(object sender, AjaxControlToolkit.AsyncFileUploadEventArgs e)
{
if (pageBannerUpload.HasFile)
{
string path = MapPath("~/") + Path.GetFileName(e.filename);
pageBannerUpload.SaveAs(path);
}
}
}
Real App Test Web.config:
<?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
WindowsMicrosoft.NetFrameworkv2.xConfig
-->
<configuration>
<configSections>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
</sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>
<appSettings>
</appSettings>
<connectionStrings>
</connectionStrings>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true">
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
<codeSubDirectories>
<add directoryName="CSCode"/>
<add directoryName="VBCode"/>
</codeSubDirectories>
</compilation>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="Annsa" namespace="Annsa.Controls" assembly="Annsa.Controls"/>
</controls>
<namespaces>
<add namespace="Microsoft.VisualBasic"/>
<add namespace="System.Data"/>
<add namespace="System.Drawing"/>
</namespaces>
</pages>
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</httpModules>
<identity impersonate="true"/>
<trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true"/>
<!-- SESSION STATE SETTINGS
mode="Off|InProc|StateServer|SqlServer"
By default ASP.NET uses cookies to identify which requests belong to a particular session.
If cookies are not available, a session can be tracked by adding a session identifier to the URL.
To disable cookies, set sessionState cookieless="true".
-->
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;user id=sa;password=" cookieless="false" timeout="20"/>
<!-- GLOBALIZATION
This section sets the globalization settings of the application.
-->
<xhtmlConformance mode="Legacy"/>
</system.web>
<location path="Pages">
<system.web>
<xhtmlConformance mode="Transitional"></xhtmlConformance>
</system.web>
</location>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider,System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
<providerOption name="CompilerVersion" value="v3.5"/>
<providerOption name="WarnAsError" value="false"/>
</compiler>
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
<providerOption name="CompilerVersion" value="v3.5"/>
<providerOption name="OptionInfer" value="true"/>
<providerOption name="WarnAsError" value="false"/>
</compiler>
</compilers>
</system.codedom>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<remove name="ScriptModule"/>
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated"/>
<remove name="ScriptHandlerFactory"/>
<remove name="ScriptHandlerFactoryAppServices"/>
<remove name="ScriptResource"/>
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</handlers>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
View 3 Replies