Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all 5678 articles
Browse latest View live

Custom ajax control does not work after uppgrading from 4.1.60919 to 7.1213.0

$
0
0

I have a custom ajax control that i use for printing content on a html page.

But after uppgrading the version of asp.net i get the following error

JavaScript runtime error: Sys.ArgumentUndefinedException: Value cannot be undefined.
Parameter name: type

you can find a example here (one with 4.1.60919 and one with 7.1213.0)

http://www.sendspace.com/filegroup/vJn9TXtcFA1KMpq6xM24lg

PrintButtonExtender.vb

Imports System.ComponentModel
Imports AjaxControlToolkit
Imports System.Web.UI
Imports System.Web.UI.WebControls<Assembly: WebResource("CustomAjax.Extenders.PrintButtonBehavior.js", "text/javascript")> <Assembly: WebResource("CustomAjax.Extenders.PrintButtonBehavior.debug.js", "text/javascript")> <Designer(GetType(PrintButtonExtenderDesigner))><ClientScriptResource("Sys.Extended.UI.PrintButtonExtender", LoadOrder:=0, ResourcePath:="CustomAjax.Extenders.PrintButtonBehavior.js")><TargetControlType(GetType(IButtonControl))> _
Public Class PrintButtonExtender
    Inherits ExtenderControlBase

    ''' <summary>
    ''' Control that has the content to print
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks><ExtenderControlProperty()><DefaultValue(CStr(Nothing))><IDReferenceProperty(GetType(Control))>
    Public Property PrintControlID As String
        Get
            Return CStr(ViewState("PrintControlID"))
        End Get
        Set(value As String)
            ViewState("PrintControlID") = value
        End Set
    End Property

    ''' <summary>
    ''' Extra css to apply to the printed content.
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks><ExtenderControlProperty()><DefaultValue(CStr(Nothing))>
    Public Property PrintingCss As String
        Get
            Return GetPropertyValue(Of String)("PrintingCss", Nothing)
        End Get
        Set(value As String)
            SetPropertyValue(Of String)("PrintingCss", value)
        End Set
    End Property<ExtenderControlProperty()><DefaultValue(600)>
    Public Property PrintingWindowHeight As Integer
        Get
            Return GetPropertyValue(Of Integer)("PrintingWindowHeight", 600)
        End Get
        Set(value As Integer)
            SetPropertyValue(Of Integer)("PrintingWindowHeight", value)
        End Set
    End Property<ExtenderControlProperty()><DefaultValue(600)>
    Public Property PrintingWindowWidth As Integer
        Get
            Return GetPropertyValue(Of Integer)("PrintingWindowWidth", 600)
        End Get
        Set(value As Integer)
            SetPropertyValue(Of Integer)("PrintingWindowWidth", value)
        End Set
    End Property<ExtenderControlProperty()><DefaultValue(CStr(Nothing))>
    Public Property PrintingWindowTitle As String
        Get

            Return GetPropertyValue(Of String)("PrintingWindowTitle", Nothing)
        End Get
        Set(value As String)
            SetPropertyValue(Of String)("PrintingWindowTitle", value)
        End Set
    End Property

    Private Sub PrintButtonExtender_Init(sender As Object, e As System.EventArgs) Handles Me.Init
        If (Not String.IsNullOrEmpty(PrintControlID)) Then
            Dim control As Control = Me.Parent.FindControl(PrintControlID)
            If (control IsNot Nothing) Then
                SetPropertyValue(Of String)("PrintControlID", control.ClientID)
            End If
        End If
    End Sub
End Class

PrintButtonBehavior.debug.js

Type.registerNamespace('Sys.Extended.UI');
Sys.Extended.UI.PrintButtonExtender = function (element) {
    Sys.Extended.UI.PrintButtonExtender.initializeBase(this, [element]);
    this._printControlIDValue = null;
    this._printingCssValue = null;
    this._printingWindowHeightValue = 600;
    this._printingWindowWidthValue = 600;
    this._printingWindowTitleValue = null;

    this._PrintElement = function () {
        var extraCss = this._printingCssValue;
        var element = document.getElementById(this._printControlIDValue);
        var width = this._printingWindowWidthValue;
        var height = this._printingWindowHeightValue;
        var title = this._printingWindowTitleValue;
        var documentStyles = this._GetDocumentStyles();
        if (title == null)
            title = "";
        //Open new window
        var win = window.open("", title, "width=" + width + "px,height=" + height + "px,status=1,resizable=1,toolbar=1,menubar=1");
        win.document.open();

        win.document.write("<html><head><title>" + title + "</title>");

        win.document.write(documentStyles);

        //Apply extra css
        if (extraCss !== undefined && extraCss !== null) {
            win.document.write("<style type=\"text/css\">" + extraCss + "</style>");
        }
        win.document.write("</head><body>" + this._OuterHTML(element) + "</body></html>");
        win.document.close();

        //Print window after a 250 ms delay
        setTimeout(function () {
            win.print();
            //win.close();
        }, 250);
        return false;
    };

    this._OuterHTML = function (node) {
        // if IE, Chrome take the internal method otherwise build one
        return node.outerHTML || (
            function(n){
                var div = document.createElement('div'), h;
                div.appendChild( n.cloneNode(true) );
                h = div.innerHTML;
                div = null;
                return h;
            })(node);
    };

    this._GetDocumentStyles = function () {
        var header = document.getElementsByTagName("HEAD")[0];
        var result = "";
        var styles = header.getElementsByTagName("style");
        for (var i = 0; i < styles.length; i++) {
            result += this._OuterHTML(styles[i]) + "\n";
        }
        var links = header.getElementsByTagName("link");
        for (var i = 0; i < links.length; i++) {
            result += this._OuterHTML(links[i]) + "\n";
        }
        return result;
    };
}


Sys.Extended.UI.PrintButtonExtender.prototype = {
    initialize: function () {
        Sys.Extended.UI.PrintButtonExtender.callBaseMethod(this, 'initialize');
        var element = this.get_element();
        this._clickHandler = Function.createDelegate(this, this._clickCallback);
        $addHandler(element, "click", this._clickHandler);
        element.setAttribute("onclick", null);
    },

    dispose: function () {

        this._printControlIdValue = null;
        this._printingCssValue = null;

        $removeHandler(this.get_element(), "click", this._clickHandler);
        this._clickHandler = null;


        Sys.Extended.UI.PrintButtonExtender.callBaseMethod(this, 'dispose');
    },

    _clickCallback: function (e) {
        e.preventDefault();
        this._PrintElement();
        return false;
    },

    get_PrintControlID: function () {
        return this._printControlIDValue;
    },
    set_PrintControlID: function (value) {
        this._printControlIDValue = value;
    },

    get_PrintingCss: function () {
        return this._printingCssValue;
    },
    set_PrintingCss: function (value) {
        this._printingCssValue = value;
    },

    get_PrintingWindowHeight: function () {
        return this._printingWindowHeightValue;
    },
    set_PrintingWindowHeight: function (value) {
        this._printingWindowHeightValue = value;
    },

    get_PrintingWindowWidth: function () {
        return this._printingWindowWidthValue;
    },
    set_PrintingWindowWidth: function (value) {
        this._printingWindowWidthValue = value;
    },

    get_PrintingWindowTitle: function () {
        return this._printingWindowTitleValue;
    },
    set_PrintingWindowTitle: function (value) {
        this._printingWindowTitleValue = value;
    }
}

Sys.Extended.UI.PrintButtonExtender.registerClass('Sys.Extended.UI.PrintButtonExtender', Sys.Extended.UI.BehaviorBase);

Edit:

After adding AjaxControlToolkit.config i instead get 

Value cannot be null.
Parameter name: key 
  Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

 Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: key

Source Error: 


 An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace: 



[ArgumentNullException: Value cannot be null.
Parameter name: key]
   System.Collections.Generic.Dictionary`2.FindEntry(TKey key) +10627293
   System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value) +12
   AjaxControlToolkit.ScriptObjectBuilder.GetScriptReferencesInternal(Type type, Stack`1 typeReferenceStack, Boolean ignoreStartingTypeReferences) +282
   AjaxControlToolkit.ScriptObjectBuilder.GetScriptReferences(Type type, Boolean ignoreStartingTypeReferences) +79
   AjaxControlToolkit.ScriptObjectBuilder.GetScriptReferences(Type type) +38
   AjaxControlToolkit.ToolkitScriptManagerConfig.GetScriptReferences(HttpContextBase context, String[] bundles, ScriptReference[]& addedScriptReferences, ScriptReference[]& removedScriptReferences) +284
   AjaxControlToolkit.ToolkitScriptManagerCombiner.LoadScriptReferences(HttpContextBase context, String[] bundles) +82
   AjaxControlToolkit.ToolkitScriptManager.LoadScriptReferences(HttpContextBase context, String[] bundles, Boolean forCombineAndMinify) +159
   AjaxControlToolkit.ToolkitScriptManager.OnLoad(EventArgs e) +340
   System.Web.UI.Control.LoadRecursive() +54
   System.Web.UI.Control.LoadRecursive() +145
   System.Web.UI.Control.LoadRecursive() +145
   System.Web.UI.Control.LoadRecursive() +145
   System.Web.UI.Control.LoadRecursive() +145
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +772


sanitizer section not recognized by web.Config under system.web

$
0
0

I have been following along several examples that supposedly work but mine keeps giving me the red line highlight.  Here is my web.config:

<?xml version="1.0"?><configuration><configSections><sectionGroup name="system.web"><section name="sanitizer" requirePermission="false" type="AjaxControlToolkit.Sanitizer.ProviderSanitizerSection, AjaxControlToolkit"/></sectionGroup></configSections><connectionStrings><add name="MyConn" connectionString="Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\BCCS_Data.mdf;Integrated Security=True"/></connectionStrings><system.web><compilation debug="true" targetFramework="4.0"/><pages><controls><add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" /></controls></pages><sanitizer defaultProvider="AntiXssSanitizerProvider"> !-- this is what goes bad --><providers><add name="AntiXssSanitizerProvider"
             type="AjaxControlToolkit.Sanitizer.AntiXssSanitizerProvider"></add></providers></sanitizer><assemblies><add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/><add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/><add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies><!--
            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 controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>--></system.web><!--
    For a description of web.config changes see http://go.microsoft.com/fwlink/?LinkId=235367.

    The following attributes can be set on the <httpRuntime> tag.<system.Web><httpRuntime targetFramework="4.5" /></system.Web>
  --></configuration>


Says this <sanitizer> element is invalid, it expects other element names.

System.InvalidCastException attempting to use HtmlEditorExtender

$
0
0

When I try using the editor extender, I get this error saying the following:

System.InvalidCastException was unhandled by user code
  HResult=-2147467262
  Message=Unable to cast object of type 'AjaxControlToolkit.HTMLEditor.Editor' to type 'System.Web.UI.WebControls.TextBox'.
  Source=AjaxControlToolkit
  StackTrace:
       at AjaxControlToolkit.HtmlEditorExtender.OnLoad(EventArgs e) in f:\TeamCity\buildAgent\work\80acd78aa4c25314\Server\AjaxControlToolkit\HtmlEditorExtender\HtmlEditorExtender.cs:line 257
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
  InnerException:

I really do not understand why this is happening.  Here is my source:

<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/AdminPanel.Master" AutoEventWireup="true" CodeBehind="AddPage.aspx.cs" Inherits="BCCS.Admin.AddPage" %><%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %><%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit.HTMLEditor" TagPrefix="cc1" %><asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"><style type="text/css">
        .auto-style4 {
            height: 12px;
        }
        .auto-style5 {
            height: 11px;
        }
        .auto-style6 {
            height: 2px;
        }</style></asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="content" runat="server"><asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></asp:ToolkitScriptManager><asp:Label ID="lblComplete" runat="server"></asp:Label><table ID="tblContentEntry" runat="server"><tr style="vertical-align:top"><td class="auto-style5">Page&nbsp;Name&nbsp;&nbsp;</td><td class="auto-style5"><asp:TextBox ID="txtPageName" runat="server"></asp:TextBox></td></tr><tr style="vertical-align:top"><td class="auto-style6">Parent&nbsp;Page&nbsp;&nbsp;</td><td class="auto-style6"><asp:DropDownList ID="ddlParentPage" runat="server" AppendDataBoundItems="True" 
                    DataSourceID="dsParentPageList" DataTextField="CategoryName" 
                    DataValueField="ID"><asp:ListItem Selected="True">-- Parent Page --</asp:ListItem><asp:ListItem Value="0">Top Level Page</asp:ListItem></asp:DropDownList><asp:SqlDataSource ID="dsParentPageList" runat="server" 
                    ConnectionString="Data Source=***********************" 
                    ProviderName="System.Data.SqlClient" 
                    SelectCommand="SELECT [ID], [CategoryName] FROM [Menu]"></asp:SqlDataSource></td></tr><tr style="vertical-align:top"><td class="auto-style6">Description:</td><td class="auto-style6"><asp:TextBox ID="txtPageDescription" runat="server" Height="16px" Width="767px"></asp:TextBox></td></tr><tr style="vertical-align:top"><td>Content:</td><td><cc1:Editor ID="edtContentEditor" runat="server" 
TargetControlID="edtContentEditor"></cc1:Editor><ajaxToolkit:HtmlEditorExtender ID="heeContentEditor" runat="server" TargetControlID="edtContentEditor"><Toolbar> <ajaxToolkit:Undo /><ajaxToolkit:Redo /><ajaxToolkit:Bold /><ajaxToolkit:Italic /><ajaxToolkit:Underline /><ajaxToolkit:StrikeThrough /><ajaxToolkit:Subscript /><ajaxToolkit:Superscript /><ajaxToolkit:JustifyLeft /><ajaxToolkit:JustifyCenter /><ajaxToolkit:JustifyRight /><ajaxToolkit:JustifyFull /><ajaxToolkit:InsertOrderedList /><ajaxToolkit:InsertUnorderedList /><ajaxToolkit:CreateLink /><ajaxToolkit:UnLink /><ajaxToolkit:RemoveFormat /><ajaxToolkit:SelectAll /><ajaxToolkit:UnSelect /><ajaxToolkit:Delete /><ajaxToolkit:Cut /><ajaxToolkit:Copy /><ajaxToolkit:Paste /><ajaxToolkit:BackgroundColorSelector /><ajaxToolkit:ForeColorSelector /><ajaxToolkit:FontNameSelector /><ajaxToolkit:FontSizeSelector /><ajaxToolkit:Indent /><ajaxToolkit:Outdent /><ajaxToolkit:InsertHorizontalRule /><ajaxToolkit:HorizontalSeparator /><ajaxToolkit:InsertImage /></Toolbar></ajaxToolkit:HtmlEditorExtender></td></tr><tr style="vertical-align:top"><td class="auto-style4">Publish:</td><td class="auto-style4"><asp:CheckBox ID="chkPublish" runat="server" /></td></tr><tr style="vertical-align:top"><td colspan="2" style="text-align:center"><asp:Button ID="btnSubmit" runat="server" Text="Add Page"
onclick="btnSubmit_Click"/></td></tr></table></asp:Content>


I hate to say I am stuck but I am.  Using ajax toolkit version 4.

AjaxFileUpload Not firing the OnUploadComplete on the Webserver

$
0
0

I've got a AjaxFileUpload that triggers code OnUploadComplete. It works fine at the localhost level, but when I build it to the Development webserver, the OnUploadComplete doesn't fire. I know this because I set a label to give me information when the OnUploadComplete fires. It is also suppose to update a sql table with information when the upload is complete.

Why won't it trigger on the webserver?

<ajaxToolkit:AjaxFileUpload ID="AjaxFileUpload1" runat="server" OnUploadComplete="AjaxFileUpload1_UploadComplete" AllowedFileTypes="doc,docx,xls,xlsx,xlsm,jpg,png,gif,pdf"
Enabled="False" />

 

HtmlEditorExtender image uploader does not work

$
0
0

What happens is when I click the Image button on the toolbar, it brings up the UI to select files for upload.  I select what I want and click Upload.  I get an error saying the temp path cannot be found.

An exception of type 'System.IO.DirectoryNotFoundException' occurred in mscorlib.dll but was not handled in user code

Additional information: Could not find a part of the path 'C:\Users\Owner\AppData\Local\Temp\_AjaxFileUpload\39608326-FA2D-258E-B99A-C8F05198BFE5'.

AJAX MaskedEditExtender doesn't appear to work

$
0
0

I am using the AJAX Toolkit MaskedEditExtender to format some of my web form's textboxes.  When I load the page and start to enter data into the textboxes, the masking doesn't show.  Any ideas on why this is happening?  I've included my page code below:

<%@ Page Language="VB" AutoEventWireup="false" Inherits="GrantManagement.programs1" Codebehind="GrantPrograms.aspx.vb" %><%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %><%@ Register assembly="ajaxcontroltoolkit" namespace="ajaxcontroltoolkit" tagprefix="ajax" %><!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>Grant Management Database</title><link rel="Stylesheet" href="App_Themes/Styles.css" type="text/css" /></head><div id ="wrapper"><body id=" bottommargin="0" rightmargin="0" topmargin="0"><form id="form1" runat="server"><asp:scriptmanager ID="Scriptmanager1" runat="server"></asp:scriptmanager><div align="center" style="text-align: left">&nbsp;<table bgcolor="#cccccc" border="0" style="width: 1024px; border-left-color: black; border-bottom-color: black; border-top-style: solid; border-top-color: black; border-right-style: solid; border-left-style: solid; border-right-color: black; border-bottom-style: solid; text-align: left;"><tr><td colspan="1"><asp:Image ID="Image1" runat="server" BorderWidth="0px" ImageUrl="~/Images/Grant_Management_Bar.png" /></td></tr><tr><td style="width: 800px; height: 13px"><asp:Panel ID="pnlDataFound" runat="server"><table style="width: 800px; border-right: black thin solid; background-color: #DCDCDC; border-top: black thin solid; border-bottom: black thin solid; border-left: black thin solid;" border="0" align="center"><tr><td style="height: 21px;"><span style="font-family: Calibri">Step 3 of 3</span></td></tr><tr><td style="border-left-color: black; border-bottom-color: black; border-top-style: none; border-top-color: black; border-right-style: none; border-left-style: none; border-right-color: black; border-bottom-style: none"
                                align="center">&nbsp;<br /><table width="800"><tr><td style="text-align: left" valign="top" width="400"><span style="font-family: Calibri">Instructions:</span></td><td align="left" width="400"><span style="font-family: Calibri">Program List</span></td></tr><tr><td style="text-align: left; border-right: black thin solid; padding-right: 5px; border-top: black thin solid; padding-left: 5px; padding-bottom: 5px; border-left: black thin solid; padding-top: 5px; border-bottom: black thin solid;" valign="top" width="400"><span style="font-family: Calibri">
                                                1. To view - Select a program from the Program List
                                                and view the details of the program in the table below.<br /><br />
                                                2.
                                    To edit - Select a program from the Program List, make changes and select the
                                                Save button below.<br /><br />
                                                3.
                                    To add- Select the New button below, add the program information and select the
                                                Save button below.</span></td><td width="400" style="border-right: black thin solid; padding-right: 5px; border-top: black thin solid; padding-left: 5px; padding-bottom: 5px; border-left: black thin solid; padding-top: 5px; border-bottom: black thin solid">
                   - <asp:ListBox ID="lbPrograms" runat="server" DataSourceID="DSProgramLB" DataTextField="GrantNameTitle"
                        Height="193px" Width="375px" AutoPostBack="True" DataValueField="ProgramID"></asp:ListBox></td></tr></table></td></tr><tr><td style="border-left-color: black; border-bottom-color: black; color: black;
                                border-top-style: solid; border-top-color: black; font-family: Calibri, Arial;
                                border-right-style: none; border-left-style: none; background-color: #F8F8FF;
                                border-right-color: black; border-bottom-style: solid" height="30"><span style="font-size: 14pt">
                                Viewing program &nbsp;</span><asp:Label ID="lblListBoxPosition" runat="server"></asp:Label><span style="font-size: 14pt">
                                of </span><asp:Label ID="lblCount" runat="server"></asp:Label></td></tr><tr><td><br /><%--JD DATALIST ITEMS--%><asp:DataList ID="DataList1" runat="server" DataSourceID="DSDataList" RepeatColumns="1" RepeatDirection="Horizontal" OnUpdateCommand="DataList1_UpdateCommand" OnDeleteCommand="DataList1_DeleteCommand" OnEditCommand="DataList1_EditCommand" DataKeyField="ProgramID" EditItemIndex="0"><EditItemTemplate><table style="width: 800px"><tr><td width="300" style="font-family: Calibri, Arial; height: 26px;" align="left">
                                                      ProgramID:</td><td width="500" style="font-family: Calibri, Arial; height: 26px;"><asp:TextBox ID="ProgramID" runat="server" Enabled="False" ReadOnly="True" Width="450px" Text='<%# Eval("ProgramID") %>' BackColor="LightGray" ForeColor="Transparent"></asp:TextBox></td></tr><tr><td width="300" style="font-family: Calibri, Arial" align="left">
                                                      EntityID:</td><td width="500" style="font-family: Calibri, Arial"><asp:TextBox ID="EntityID" runat="server" Enabled="False" ReadOnly="True" Width="450px" Text='<%# Eval("EntityID") %>' BackColor="LightGray"></asp:TextBox></td></tr><tr><td width="300" style="font-family: Calibri, Arial" align="left">
                                                      Agency:</td><td width="500" style="font-family: Calibri, Arial"><asp:TextBox ID="Agency" runat="server" Text='<%# Bind("Agency") %>' Width="450px"></asp:TextBox></td><asp:RequiredFieldValidator ID="Agency_RequiredFieldValidator" ControlToValidate="Agency" ValidationGroup="Val" runat="server" ErrorMessage="Agency is required.  Please enter the agency."></asp:RequiredFieldValidator></tr><tr><td width="300" style="font-family: Calibri, Arial" align="left">
                                                      Grant Name/Title::</td><td width="500" style="font-family: Calibri, Arial"><asp:TextBox ID="GrantNameTitle" runat="server" Text='<%# Bind("GrantNameTitle") %>' Width="450px"></asp:TextBox></td></tr><tr><td style="font-family: Calibri, Arial;" width="300" align="left">
                                                      Grant Number:</td><td style="font-family: Calibri, Arial;" width="500"><asp:TextBox ID="GrantNumber" runat="server" Text='<%# Bind("GrantNumber") %>'
                                                          Width="450px"></asp:TextBox><%--<asp:CompareValidator ID="GrantNumber_CompareValidator" runat="server" ErrorMessage="Please enter a numeric value"
                                                            ControlToValidate="GrantNumber" Type="Integer" ValidationGroup="Val"></asp:CompareValidator>--%></td></tr><tr><td width="300" style="font-family: Calibri, Arial" align="left">
                                                      CFDA Number:</td><td width="500" style="font-family: Calibri, Arial"><asp:TextBox ID="CFDANumber" runat="server" Text='<%# Bind("CFDANumber") %>' Width="450px"></asp:TextBox></td></tr><tr><td width="300" style="font-family: Calibri, Arial" align="left">
                                                      Project Period:</td><td width="500" style="font-family: Calibri, Arial"><asp:TextBox ID="ProjectPeriod" runat="server" Text='<%# Bind("ProjectPeriod") %>'
                                                          Width="450px"></asp:TextBox><ajax:MaskedEditExtender ID="ProjectPeriod_MaskedEditExtender" runat="server"
                                                          CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder=""
                                                          CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder=""
                                                          CultureThousandsPlaceholder="" CultureTimePlaceholder="" Enabled="True"
                                                          Mask="99/9999 - 99/9999" TargetControlID="ProjectPeriod"></ajax:MaskedEditExtender></td></tr><tr><td width="300" style="font-family: Calibri, Arial" align="left">
                                                     Total Awarded Amount:</td><td width="500" style="font-family: Calibri, Arial"><asp:TextBox ID="TotalAwardedAmount" runat="server" Text='<%# Bind("TotalAwardedAmount") %>' Width="450px"></asp:TextBox><ajax:MaskedEditExtender ID="TotalAwardedAmount_MaskedEditExtender"
                                                          runat="server" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder=""
                                                          CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder=""
                                                          CultureThousandsPlaceholder="" CultureTimePlaceholder="" Enabled="True"
                                                          Mask="$999,999,999.00" TargetControlID="TotalAwardedAmount"></ajax:MaskedEditExtender><%--<asp:CompareValidator ID="TotalAwardedAmount_CompareValidator" runat="server" ErrorMessage="Please enter a currency value"
                                                            ControlToValidate="TotalAwardedAmount" Type="Currency" ValidationGroup="Val"></asp:CompareValidator>--%></td></tr><tr><td width="300" style="font-family: Calibri, Arial;" align="left">
                                                      Grant Expenditures Amount:</td><td width="500" style="font-family: Calibri, Arial;"><asp:TextBox ID="GrantExpendituresAmount" runat="server" Text='<%# Bind("GrantExpendituresAmount") %>'
                                                          Width="450px"></asp:TextBox><ajax:MaskedEditExtender ID="GrantExpendituresAmount_MaskedEditExtender"
                                                          runat="server" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder=""
                                                          CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder=""
                                                          CultureThousandsPlaceholder="" CultureTimePlaceholder="" Enabled="True"
                                                          Mask="$999,999,999.00" TargetControlID="GrantExpendituresAmount"></ajax:MaskedEditExtender><%--<asp:CompareValidator ID="GrantExpendituresAmount_CompareValidator" runat="server" ErrorMessage="Please enter a currency value"
                                                            ControlToValidate="GrantExpendituresAmount" Type="Currency" ValidationGroup="Val"></asp:CompareValidator>--%></td></tr><tr><td width="300" style="font-family: Calibri, Arial" align="left">
                                                      Award Sub Recipient Amount:</td><td width="500" style="font-family: Calibri, Arial"><asp:TextBox ID="AwardSubRecipientAmount" runat="server" Text='<%# Bind("AwardSubRecipientAmount") %>'
                                                          Width="450px"></asp:TextBox><ajax:MaskedEditExtender ID="AwardSubRecipientAmount_MaskedEditExtender"
                                                          runat="server" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder=""
                                                          CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder=""
                                                          CultureThousandsPlaceholder="" CultureTimePlaceholder="" Enabled="True"
                                                          Mask="$999,999,999.00" TargetControlID="AwardSubRecipientAmount"></ajax:MaskedEditExtender><%--<asp:CompareValidator ID="AwardSubRecipientAmount_CompareValidator" runat="server" ErrorMessage="Please enter a currency value"
                                                            ControlToValidate="AwardSubRecipientAmount" Type="Currency" ValidationGroup="Val"></asp:CompareValidator>--%></td></tr><tr><td width="300" style="font-family: Calibri, Arial" align="left">
                                                      Administrator:</td><td width="500" style="font-family: Calibri, Arial"><asp:TextBox ID="Administrator" runat="server" Text='<%# Bind("Administrator") %>'
                                                          Width="450px"></asp:TextBox></td></tr><tr><td width="300" style="font-family: Calibri, Arial" align="left">
                                                      Phone:</td><td width="500" style="font-family: Calibri, Arial"><asp:TextBox ID="Phone" runat="server" Text='<%# Bind("Phone") %>'
                                                          Width="450px"></asp:TextBox><ajax:MaskedEditExtender ID="Phone_MaskedEditExtender" runat="server"
                                                          CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder=""
                                                          CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder=""
                                                          CultureThousandsPlaceholder="" CultureTimePlaceholder="" Enabled="True"
                                                          Mask="(999) 999-9999" MaskType="Number" TargetControlID="Phone"></ajax:MaskedEditExtender></td></tr><tr><td width="300" style="font-family: Calibri, Arial" align="left">
                                                      Department/Lawson Cost Center Number:</td><td width="500" style="font-family: Calibri, Arial"><asp:TextBox ID="DepartmentCostCenterNumber" runat="server" Text='<%# Bind("DepartmentCostCenterNumber") %>'
                                                          Width="450px"></asp:TextBox></td></tr><tr><%--<td width="300" style="font-family: Calibri, Arial" align="left">
                                                      System Date:</td>--%><td width="500" style="font-family: Calibri, Arial"><asp:TextBox ID="SystemDate" runat="server" Text='<%# Bind("SystemDate") %>' Width="450px" BackColor="Silver" ReadOnly="True" Visible=false></asp:TextBox></td></tr><tr><td width="300" valign="top" style="font-family: Calibri, Arial" align="left">
                                                      Comments:</td><td width="500" style="font-family: Calibri, Arial"><asp:TextBox ID="Comments" runat="server" Height="200px" Text='<%# Bind("Comments") %>'
                                                          TextMode="MultiLine" Width="450px"></asp:TextBox></td></tr><tr><td width="300" style="font-family: Calibri, Arial" align="left"></td><td width="500"></td></tr><tr><td width="300" style="font-family: Calibri, Arial" align="left"></td><td width="500"></td></tr><tr><td colspan="2" style="font-family: Calibri, Arial; text-align: center;" align="left"><table style="width: 800px"><tr><td colspan="3" style="text-align: center"><asp:Button ID="btnNew" runat="server" Text="New Program" Width="150px" OnClick="DataList1_ClearCommand" />
                                                                  |<asp:Button ID="btnSave" runat="server" Text="Save Program" Width="150px" CommandName="Update" ValidationGroup="Val" OnClientClick="return alert('Program Saved');"/>
                                                                  |<asp:Button ID="btnDelete" runat="server" Text="Delete Program" Width="150px" CommandName="Delete" OnClientClick="return confirm(' Are you sure you want to delete this program?');"  /></td></tr></table>&nbsp;<asp:Button ID="btnMainMenu" runat="server" OnClick="btnMainMenu_Click" Text="Main Menu"
                                                          Width="150px" /><asp:Button ID="btnFinish" runat="server" OnClick="btnFinish_Click" Text="Complete Survey"
                                                          Width="150px" /></td></tr></table></EditItemTemplate><EditItemStyle BackColor="#E0E0E0" /></asp:DataList></td></tr></table></asp:Panel></td></tr><tr><td style="width: 800px; height: 71px;"><asp:Panel ID="pnlNoData" runat="server"><%--JD - TABLE DATA--%><table style="width: 800px; border-right: black thin solid; border-top: black thin solid; border-left: black thin solid; border-bottom: black thin solid;"><tr><td colspan="2" style="font-size: 12pt; font-family: Calibri, Arial; background-color: #DCDCDC;
                        text-align: center; border-top-width: thin; border-left-width: thin; border-left-color: black; border-top-color: black; border-bottom: black thin solid; border-right-width: thin; border-right-color: black;" height="75"><br />
                        Your entity does not currently have any grant programs recorded.&nbsp;<br />
                        Ple<span lang="en-us">ase</span> enter the information below and click the Save
                        Program button.<br /><asp:TextBox ID="ProgramID" runat="server" Enabled="False"
                            Text='<%# Bind("ProgramID") %>' Visible="False" Width="450px"></asp:TextBox></td></tr><tr><td height="25" style="font-family: Calibri, Arial; text-align: left" width="300"></td><td width="500"></td></tr><tr><td style="font-family: Calibri, Arial; height: 26px; text-align: left"
                        width="300">
                        Entity:</td><td style="height: 26px" width="500"><asp:TextBox ID="EntityID" runat="server" Text='<%# Bind("EntityID") %>'
                            Width="450px" Visible="False" MaxLength="4"></asp:TextBox></td></tr><tr><td style="font-family: Calibri, Arial; height: 26px; text-align: left"
                        width="300">
                        Awarding Agency:</td><td style="height: 26px" width="500"><asp:TextBox ID="Agency" runat="server" Text='<%# Bind("Agency") %>'
                            Width="450px"></asp:TextBox><asp:RequiredFieldValidator ID="Agency_RequiredFieldValidator" ControlToValidate="Agency" ValidationGroup="Val" runat="server" ErrorMessage="Agency is required.  Please enter the agency."></asp:RequiredFieldValidator></td></tr><tr><td width="300" style="font-family: Calibri, Arial; text-align: left">
                        Grant Name/Title:</td><td width="500"><asp:TextBox ID="GrantNameTitle" runat="server" Text='<%# Bind("GrantNameTitle") %>'
                            Width="450px"></asp:TextBox></td></tr><tr><td style="font-family: Calibri, Arial; text-align: left;" width="300">
                        Grant Number:</td><td style="height: 25px" width="500"><asp:TextBox ID="GrantNumber" runat="server" Text='<%# Bind("GrantNumber") %>'
                            Width="450px"></asp:TextBox><%--<asp:CompareValidator ID="GrantNumber_CompareValidator" runat="server" ErrorMessage="Please enter a numeric value"
                             ControlToValidate="GrantNumber" Type="Integer" ValidationGroup="Val"></asp:CompareValidator>--%></td></tr><tr><td width="300" style="font-family: Calibri, Arial; text-align: left">
                        CFDA Number:</td><td width="500"><asp:TextBox ID="CFDANumber" runat="server" Text='<%# Bind("CFDANumber") %>'
                            Width="450px"></asp:TextBox></td></tr><tr><td width="300" style="font-family: Calibri, Arial; text-align: left">
                        Project Period:</td><td width="500"><asp:TextBox ID="ProjectPeriod" runat="server" Text='<%# Bind("ProjectPeriod") %>'
                            Width="450px"></asp:TextBox><ajax:MaskedEditExtender ID="ProjectPeriod_MaskedEditExtender" runat="server"
                            CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder=""
                            CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder=""
                            CultureThousandsPlaceholder="" CultureTimePlaceholder="" Enabled="True"
                            Mask="99/9999 - 99/9999" TargetControlID="ProjectPeriod"></ajax:MaskedEditExtender></td></tr><tr><td width="300" style="font-family: Calibri, Arial; text-align: left">
                        Total Awarded Amount:</td><td width="500"><asp:TextBox ID="TotalAwardedAmount" runat="server"
                            Text='<%# Bind("TotalAwardedAmount") %>' Width="450px"></asp:TextBox><ajax:MaskedEditExtender ID="TotalAwardedAmount_MaskedEditExtender"
                            runat="server" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder=""
                            CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder=""
                            CultureThousandsPlaceholder="" CultureTimePlaceholder="" Enabled="True"
                            Mask="$999,999,999.00" TargetControlID="TotalAwardedAmount"></ajax:MaskedEditExtender><%--<asp:CompareValidator ID="TotalAwardedAmount_CompareValidator" runat="server" ErrorMessage="Please enter a currency value"
                             ControlToValidate="TotalAwardedAmount" Type="Currency" ValidationGroup="Val"></asp:CompareValidator>--%></td></tr><tr><td width="300" style="font-family: Calibri, Arial; text-align: left;">
                        Grant Expenditures Amount: </td><td width="500" style="height: 26px"><asp:TextBox ID="GrantExpendituresAmount" runat="server" Text='<%# Bind("GrantExpendituresAmount") %>'
                            Width="450px"></asp:TextBox><ajax:MaskedEditExtender ID="GrantExpendituresAmount_MaskedEditExtender"
                            runat="server" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder=""
                            CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder=""
                            CultureThousandsPlaceholder="" CultureTimePlaceholder="" Enabled="True"
                            Mask="$999,999,999.00" TargetControlID="GrantExpendituresAmount"></ajax:MaskedEditExtender><%--<asp:CompareValidator ID="GrantExpendituresAmount_CompareValidator" runat="server" ErrorMessage="Please enter a currency value"
                            ControlToValidate="GrantExpendituresAmount" Type="Currency" ValidationGroup="Val"></asp:CompareValidator>--%></td></tr><tr><td width="300" style="font-family: Calibri, Arial; text-align: left">
                        Award Sub-Recipient Amount:</td><td width="500"><asp:TextBox ID="AwardSubRecipientAmount" runat="server" Text='<%# Bind("AwardSubRecipientAmount") %>'
                            Width="450px"></asp:TextBox><ajax:MaskedEditExtender ID="AwardSubRecipientAmount_MaskedEditExtender"
                            runat="server" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder=""
                            CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder=""
                            CultureThousandsPlaceholder="" CultureTimePlaceholder="" Enabled="True"
                            Mask="$999,999,999.00" TargetControlID="AwardSubRecipientAmount"></ajax:MaskedEditExtender><%--<asp:CompareValidator ID="AwardSubRecipientAmount_CompareValidator" runat="server" ErrorMessage="Please enter a currency value"
                            ControlToValidate="AwardSubRecipientAmount" Type="Currency" ValidationGroup="Val"></asp:CompareValidator>--%></td></tr><tr><td width="300" style="font-family: Calibri, Arial; text-align: left">
                        Administrator:</td><td width="500"><asp:TextBox ID="Administrator" runat="server" Text='<%# Bind("Administrator") %>'
                            Width="450px"></asp:TextBox></td></tr><tr><td width="300" style="font-family: Calibri, Arial; text-align: left">
                        Administrator Phone:</td><td width="500"><asp:TextBox ID="Phone" runat="server" Text='<%# Bind("Phone") %>'
                            Width="450px"></asp:TextBox><ajax:MaskedEditExtender ID="Phone_MaskedEditExtender" runat="server"
                            CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder=""
                            CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder=""
                            CultureThousandsPlaceholder="" CultureTimePlaceholder="" Enabled="True"
                            Mask="(999) 999-9999" MaskType="Number" TargetControlID="Phone"></ajax:MaskedEditExtender></td></tr><tr><td width="300" style="font-family: Calibri, Arial; text-align: left">
                        Department/Lawson Cost Center Number:</td><td width="500"><asp:TextBox ID="DepartmentCostCenterNumber" runat="server" Text='<%# Bind("DepartmentCostCenterNumber") %>'
                            Width="450px"></asp:TextBox></td></tr><tr><%--<td width="300" style="font-family: Calibri, Arial; text-align: left">
                        System Date:</td>--%><td width="500"><asp:TextBox ID="SystemDate" runat="server" Text='<%# Bind("SystemDate") %>'
                            Width="450px" BackColor="#E0E0E0" ReadOnly="True" Visible="False"></asp:TextBox></td></tr><tr><td width="300" valign="top" style="font-family: Calibri, Arial; text-align: left">
                        Comments:</td><td width="500"><asp:TextBox ID="Comments" runat="server" Height="200px" Text='<%# Bind("Comments") %>'
                            TextMode="MultiLine" Width="450px"></asp:TextBox></td></tr><tr><td width="300"></td><td width="500"></td></tr><tr><td width="300"></td><td width="500"></td></tr><tr><td colspan="2"><table style="width: 800px"><tr><td style="text-align: center; height: 26px;"><asp:Button ID="btnNew" runat="server" Text="New Program" Width="150px" OnClick="DataList1_ClearCommand" Enabled="False" />
                                    |<asp:Button ID="btnSave" runat="server" Text="Save Program" Width="150px" ValidationGroup="Val" CommandName="Update"/>
                                    |<asp:Button ID="btnDelete" runat="server" Text="Delete Program" Width="150px" CommandName="Delete" Enabled="False" /><br /><asp:Button ID="btnMain" runat="server" Text="Main Menu" Width="150px" />&nbsp;|&nbsp;<asp:Button ID="btnFinish" runat="server" Text="Complete Survey" Width="150px" /></td></tr></table></td></tr></table></asp:Panel><br /><span style="font-family: Calibri"><span style="font-size: 10pt">Created and Mainted
                        by the Financial Services Support CentererCenterer                      <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="mailto:fssc@baylorhealth.edu">fssc@baylorhealth.edu</asp:HyperLink><span
                            style="font-size: 10pt"> - 214-820-4357<br />
                            Last updated 02.26.2013</span></span></td></tr></table><br /><br /><br /><asp:AccessDataSource ID="DSDataList" runat="server" DataFile="~/App_Data/BHCS_Grant_Survey.mdb"
            SelectCommand="SELECT [ProgramID], [EntityID], [Agency], [GrantNameTitle], [GrantNumber], [CFDANumber], [ProjectPeriod], [TotalAwardedAmount], [GrantExpendituresAmount], [AwardSubRecipientAmount], [Administrator], [Phone], [DepartmentCostCenterNumber], [SystemDate], [Comments] FROM [tblPrograms] WHERE ([ProgramID] = ?)"
            DeleteCommand="DELETE FROM [tblPrograms] WHERE [ProgramID] = ?"
            InsertCommand="INSERT INTO [tblPrograms] ([EntityID], [Agency], [GrantNameTitle], [GrantNumber], [CFDANumber], [ProjectPeriod], [TotalAwardedAmount], [GrantExpendituresAmount], [AwardSubRecipientAmount], [Administrator], [Phone], [DepartmentCostCenterNumber], [SystemDate],  [Comments]) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
            UpdateCommand="UPDATE [tblPrograms] SET [EntityID] = ?, [Agency] = ?, [GrantNameTitle] = ?, [GrantNumber] = ?, [CFDANumber] = ?, [ProjectPeriod] = ?, [TotalAwardedAmount] = ?, [GrantExpendituresAmount] = ?, [AwardSubRecipientAmount] = ?, [Administrator] = ?, [Phone] = ?, [DepartmentCostCenterNumber] = ?, [SystemDate] = ? WHERE [ProgramID] = ?"><SelectParameters><asp:ControlParameter ControlID="lbPrograms" Name="ProgramID" PropertyName="SelectedValue"
                    Type="Int32" /></SelectParameters><DeleteParameters><asp:Parameter Name="ProgramID" Type="Int32" /></DeleteParameters><UpdateParameters><asp:Parameter Name="EntityID" Type="String" /><asp:Parameter Name="Agency" Type="String" /><asp:Parameter Name="GrantNameTitle" Type="String" /><asp:Parameter Name="GrantNumber" Type="String" /><asp:Parameter Name="CFDANumber" Type="String" /><asp:Parameter Name="ProjectPeriod" Type="String" /><asp:Parameter Name="TotalAwardedAmount" Type="String" /><asp:Parameter Name="GrantExpendituresAmount" Type="String" /><asp:Parameter Name="AwardSubRecipientAmount" Type="String" /><asp:Parameter Name="Administrator" Type="String" /><asp:Parameter Name="Phone" Type="String" /><asp:Parameter Name="DepartmentCostCenterNumber" Type="String" /><asp:Parameter Name="SystemDate" Type="String" /><asp:Parameter Name="Comments" Type="String" /><%--<asp:Parameter Name="Person_Name" Type="String" /><asp:Parameter Name="Update_Date" Type="String" /><asp:Parameter Name="Reviewed_Date" Type="String" /><asp:Parameter Name="Entity_Type" Type="String" /><asp:Parameter Name="System_Date" Type="String" /><asp:Parameter Name="Comments" Type="String" />--%><asp:Parameter Name="ProgramID" Type="Int32" /></UpdateParameters><InsertParameters><asp:SessionParameter Name="EntityID" SessionField="Entity" Type="String" /><asp:ControlParameter ControlID="Agency" Name="Agency" PropertyName="Text" Type="String" /><asp:ControlParameter ControlID="GrantNameTitle" Name="GrantNameTitle" PropertyName="Text" Type="String" /><asp:ControlParameter ControlID="GrantNumber" Name="GrantNumber" PropertyName="Text" Type="String" /><asp:ControlParameter ControlID="CFDANumber" Name="CFDANumber" PropertyName="Text" Type="String" /><asp:ControlParameter ControlID="ProjectPeriod" Name="ProjectPeriod" PropertyName="Text" Type="String" /><asp:ControlParameter ControlID="TotalAwardedAmount" Name="TotalAwardedAmount" PropertyName="Text" Type="String" /><asp:ControlParameter ControlID="GrantExpendituresAmount" Name="GrantExpendituresAmount" PropertyName="Text" Type="String" /><asp:ControlParameter ControlID="AwardSubRecipientAmount" Name="AwardSubRecipientAmount" PropertyName="Text" Type="String" /><asp:ControlParameter ControlID="Administrator" Name="Administrator" PropertyName="Text" Type="String" /><asp:ControlParameter ControlID="Phone" Name="Phone" PropertyName="Text" Type="String" /><asp:ControlParameter ControlID="DepartmentCostCenterNumber" Name="DepartmentCostCenterNumber" PropertyName="Text" Type="String" /><asp:ControlParameter ControlID="SystemDate" Name="SystemDate" PropertyName="Text" Type="String" /><asp:ControlParameter ControlID="Comments" Name="Comments" PropertyName="Text" Type="String" /><%--  <asp:ControlParameter ControlID="Person_Name" Name="Person_Name" PropertyName="Text" Type="String" /><asp:ControlParameter ControlID="Entity_Type" Name="Entity_Type" PropertyName="Text" Type="String" /><asp:ControlParameter ControlID="System_Date" Name="System_Date" PropertyName="Text" Type="String" /><asp:ControlParameter ControlID="Comments" Name="Comments" PropertyName="Text" Type="String" />--%></InsertParameters></asp:AccessDataSource><asp:AccessDataSource ID="DSDataSource_History" runat="server" DataFile="~/App_Data/BHCS_Grant_Survey.mdb"
            SelectCommand="SELECT [ProgramID], [EntityID], [Agency], [GrantNameTitle], [GrantNumber], [CFDANumber], [ProjectPeriod], [TotalAwardedAmount], [GrantExpendituresAmount], [AwardSubRecipientAmount], [Administrator], [Phone], [DepartmentCostCenterNumber], [SystemDate], [Comments] FROM [tblPrograms] WHERE ([ProgramID] = ?)"
            DeleteCommand="DELETE FROM [tblPrograms] WHERE [ProgramID] = ?"
            InsertCommand="INSERT INTO [tblProgramHistory] ([EntityID], [Agency], [GrantNameTitle], [GrantNumber], [CFDANumber], [ProjectPeriod], [TotalAwardedAmount], [GrantExpendituresAmount], [AwardSubRecipientAmount], [Administrator], [Phone], [DepartmentCostCenterNumber], [SystemDate],  [Comments]) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
            UpdateCommand="UPDATE [tblPrograms] SET [EntityID] = ?, [Agency] = ?, [GrantNameTitle] = ?, [GrantNumber] = ?, [CFDANumber] = ?, [ProjectPeriod] = ?, [TotalAwardedAmount] = ?, [GrantExpendituresAmount] = ?, [AwardSubRecipientAmount] = ?, [Administrator] = ?, [Phone] = ?, [DepartmentCostCenterNumber] = ?, [SystemDate] = ? WHERE [ProgramID] = ?"><InsertParameters><asp:SessionParameter Name="EntityID" SessionField="Entity" Type="String" /><asp:ControlParameter ControlID="Agency" Name="Agency" PropertyName="Text" Type="String" /><asp:ControlParameter ControlID="GrantNameTitle" Name="GrantNameTitle" PropertyName="Text" Type="String" /><asp:ControlParameter ControlID="GrantNumber" Name="GrantNumber" PropertyName="Text" Type="String" /><asp:ControlParameter ControlID="CFDANumber" Name="CFDANumber" PropertyName="Text" Type="String" /><asp:ControlParameter ControlID="ProjectPeriod" Name="ProjectPeriod" PropertyName="Text" Type="String" /><asp:ControlParameter ControlID="TotalAwardedAmount" Name="TotalAwardedAmount" PropertyName="Text" Type="String" /><asp:ControlParameter ControlID="GrantExpendituresAmount" Name="GrantExpendituresAmount" PropertyName="Text" Type="String" /><asp:ControlParameter ControlID="AwardSubRecipientAmount" Name="AwardSubRecipientAmount" PropertyName="Text" Type="String" /><asp:ControlParameter ControlID="Administrator" Name="Administrator" PropertyName="Text" Type="String" /><asp:ControlParameter ControlID="Phone" Name="Phone" PropertyName="Text" Type="String" /><asp:ControlParameter ControlID="DepartmentCostCenterNumber" Name="DepartmentCostCenterNumber" PropertyName="Text" Type="String" /><asp:ControlParameter ControlID="SystemDate" Name="SystemDate" PropertyName="Text" Type="String" /><asp:ControlParameter ControlID="Comments" Name="Comments" PropertyName="Text" Type="String" /><%--<asp:ControlParameter ControlID="Person_Name" Name="Person_Name" PropertyName="Text" Type="String" /><asp:ControlParameter ControlID="Entity_Type" Name="Entity_Type" PropertyName="Text" Type="String" /><asp:ControlParameter ControlID="System_Date" Name="System_Date" PropertyName="Text" Type="String" /><asp:ControlParameter ControlID="Comments" Name="Comments" PropertyName="Text" Type="String" />--%></InsertParameters></asp:AccessDataSource>&nbsp;&nbsp;<asp:AccessDataSource ID="DSProgramLB" runat="server" DataFile="~/App_Data/BHCS_Grant_Survey.mdb"

          SelectCommand="SELECT [EntityID], [GrantNameTitle], [ProgramID] FROM [tblPrograms] WHERE ([EntityID] = ?) Order By GrantNameTitle"><SelectParameters><asp:SessionParameter Name="EntityID" SessionField="Entity" Type="String" /></SelectParameters></asp:AccessDataSource><asp:DataList ID="DataList2" runat="server" DataSourceID="DSProgramLB"></asp:DataList>&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br /><br /><br /><br /><br />&nbsp;</div></form></body></div></html>

Thanks in advance for any assistance rendered.

ajax non of the controls works

$
0
0

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>     <asp:UpdatePanel ID="UpdatePanel1" runat="server">     <ContentTemplate>

  <asp:TextBox ID="TextBox1_cmbOpen" runat="server" Width="155px" Font-Size="Large"></asp:TextBox>

      <asp:MaskedEditExtender       runat="server"     TargetControlID="TextBox1_cmbOpen"     Mask="9,999,999.99"     MessageValidatorTip="true"         MaskType="Number"     InputDirection="RightToLeft"     AcceptNegative="Left"     DisplayMoney="Left"    ErrorTooltipEnabled="True"/>

 </ContentTemplate>      </asp:UpdatePanel>    

JavaScript runtime error: Unable to get property 'UI' of undefined or null reference

AJAX HtmlEditorExtender doesn't work with latest chrome version

$
0
0

AJAX HtmlEditorExtender throws error in latest version of chrome (Version 36.0.1985.125 m) Uncaught TypeError: Failed to execute 'collapse' on 'Selection': parameter 1 is not of type 'Node'.


HoverMenu: trigger onShow and onHide events for jquery script

$
0
0

Dear all,

I have a ajaxToolkit:HoverMenuExtender that shows/hide a panel:

<ajaxToolkit:HoverMenuExtender ID="HoverMenuExtender3" runat="Server" TargetControlID="imgbtnMore"
PopupControlID="pnlOtherFunctions" PopupPosition="Bottom" OffsetX="-202" OffsetY="4"
PopDelay="50" BehaviorID="behavemenumore" /><asp:Panel CssClass="popupMoreMenu MenuItem hoverPanel" ID="pnlOtherFunctions" runat="server">


I (really) need to intercept the events onShow/onHide (when the panel "pnlOtherFunctions" appears and disappear), because I want to hide/show another div in the page.
Unfortunately, every attempts to intercepts events on my panel visibility failed.

How can I easily achieve this?

My best,
MT

Sys.ArgumentException: Cannot deserialize. The data does not correspond to valid JSON.

$
0
0

I have a problem that relates to the ajax upload.  I am using styles on a div to show/hide the panel these objects are inside of.  When I hit my upload tool, I pick the file I want and click upload.  I get this error:

Sys.ArgumentException: Cannot deserialize. The data does not correspond to valid JSON.

I heard something about AJAX not playing nice if the control is initially hidden.  I was under the impression that using a DIV control would eliminate this problem but it has not.  Any ideas?

EditContent.aspx<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/AdminPanel.Master" AutoEventWireup="true" 
CodeBehind="EditContent.aspx.cs" Inherits="BCCS.Admin.EditContent" %><%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit.HTMLEditor" TagPrefix="cc1" %><asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"></asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="content" runat="server"><div runat="server" id="SelectPane"><asp:Panel ID="pnlSelection" runat="server"><cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></cc1:ToolkitScriptManager><asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="IdNum" Width="500px" 
            onselectedindexchanged="GridView1_SelectedIndexChanged"><AlternatingRowStyle BackColor="#CCCCCC" /><Columns>            <asp:TemplateField ShowHeader="False"><HeaderStyle Width="100px" /><ItemTemplate ><asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" 
                            CommandName="Select" Text="Select"></asp:LinkButton></ItemTemplate></asp:TemplateField><asp:BoundField DataField="IdNum" HeaderText="Record ID" InsertVisible="False" 
                    ReadOnly="True" SortExpression="IdNum" Visible="False" /><asp:BoundField DataField="CatName" HeaderText="Menu Item" 
                    SortExpression="CatName" /><asp:TemplateField HeaderText="Content" SortExpression="PageContent" 
                    Visible="False"><ItemTemplate><asp:Label ID="Label1" runat="server" Text='<%# Bind("CatName") %>'></asp:Label></ItemTemplate><EditItemTemplate><asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("CatName") %>'></asp:TextBox></EditItemTemplate></asp:TemplateField></Columns><HeaderStyle BackColor="#33CCFF" /><RowStyle BackColor="White" /></asp:GridView></asp:Panel></div><div runat="server" id="editpane"><asp:Panel ID="pnlEditPage" runat="server"><asp:DetailsView ID="DetailsView1" runat="server" Height="37px" Width="582px" 
            AutoGenerateRows="False" DataKeyNames="Id" 
            DefaultMode="Edit" OnItemUpdating = "DetailsView_ItemUpdated" ><Fields><asp:BoundField DataField="Id" HeaderText="Id" InsertVisible="False" 
                    SortExpression="Id" ReadOnly="True" /><asp:TemplateField HeaderText="Content" SortExpression="PageContent"><EditItemTemplate>      <asp:TextBox ID="Editor1" runat="server" Text='<%# Bind("PageContent") %>' 
                            Height="200px" TextMode="MultiLine" Width="565px" /><cc1:HtmlEditorExtender ID="HtmlEditorExtender1" runat="server" 
                        TargetControlID="Editor1" OnImageUploadComplete="saveFile" EnableSanitization="false" DisplaySourceTab="true"><Toolbar><cc1:Undo /><cc1:Redo /><cc1:Bold /><cc1:Italic /><cc1:Underline /><cc1:StrikeThrough /><cc1:Subscript /><cc1:Superscript /><cc1:JustifyLeft /><cc1:JustifyCenter /><cc1:JustifyRight /><cc1:JustifyFull /><cc1:InsertOrderedList /><cc1:InsertUnorderedList /><cc1:CreateLink /><cc1:UnLink /><cc1:RemoveFormat /><cc1:SelectAll /><cc1:UnSelect /><cc1:Delete /><cc1:Cut /><cc1:Copy /><cc1:Paste /><cc1:BackgroundColorSelector /><cc1:ForeColorSelector /><cc1:FontNameSelector /><cc1:FontSizeSelector /><cc1:Indent /><cc1:Outdent /><cc1:InsertHorizontalRule /><cc1:HorizontalSeparator /><cc1:InsertImage /></Toolbar></cc1:HtmlEditorExtender></EditItemTemplate><InsertItemTemplate><asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("PageContent") %>'></asp:TextBox></InsertItemTemplate><ItemTemplate><asp:Label ID="Label1" runat="server" Text='<%# Bind("PageContent") %>'></asp:Label></ItemTemplate></asp:TemplateField><asp:TemplateField ShowHeader="False"><EditItemTemplate><br /><br /><br /><asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" 
                            CommandName="Update" Text="Update"></asp:LinkButton>&nbsp;<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" 
                            CommandName="Cancel" Text="Cancel" onclick="LinkButton2_Click"></asp:LinkButton></EditItemTemplate><ItemTemplate><asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" 
                            CommandName="Edit" Text="Edit"></asp:LinkButton></ItemTemplate></asp:TemplateField></Fields></asp:DetailsView></asp:Panel></div></asp:Content>
EditContent.aspx.cs code:

using System;
using System.Data;
using System.Data.SqlClient;
using System.Web.Configuration;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace BCCS.Admin
{    
    public partial class EditContent : System.Web.UI.Page
    {
        protected global::System.Web.UI.WebControls.Panel pnlSelection;
        protected global::AjaxControlToolkit.ToolkitScriptManager ToolkitScriptManager1;
        protected global::System.Web.UI.WebControls.GridView GridView1;
        protected global::System.Web.UI.WebControls.Panel pnlEditPage;
        protected global::System.Web.UI.WebControls.DetailsView DetailsView1;
        protected global::AjaxControlToolkit.HtmlEditorExtender heeEditor1;
        protected global::System.Web.UI.HtmlControls.HtmlGenericControl SelectPane;
        protected global::System.Web.UI.HtmlControls.HtmlGenericControl editpane;
        protected global::System.Web.UI.HtmlControls.HtmlTextArea Editor1;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                GridViewDataBind();
            }
        }
        private void GridViewDataBind()
        {
            GridView1.DataSource = "";
            SqlConnection conn = new SqlConnection(WebConfigurationManager.ConnectionStrings["MyConn"].ConnectionString);
            SqlCommand cmd = new SqlCommand("SELECT Menu.CategoryName AS CatName, Menu.Description AS Descr, Pages.PageContent AS Content, Menu.Published, Menu.ID AS IdNum FROM Menu INNER JOIN Pages ON Menu.ID = Pages.MenuID");
            conn.Open();
            cmd.Connection = conn;
            SqlDataReader dr = cmd.ExecuteReader();
            DataTable dt = new DataTable();
            dt.Load(dr);
            GridView1.DataSource = dt;
            GridView1.DataBind();
        }
        private void DetailsViewDataBind(string SelectedID)
        {
            DetailsView1.DataSource = "";
            SqlConnection conn = new SqlConnection(WebConfigurationManager.ConnectionStrings["MyConn"].ConnectionString);
            SqlCommand cmd = new SqlCommand("SELECT * FROM [Pages] WHERE ([MenuId] = @Id)");
            conn.Open();
            cmd.Parameters.AddWithValue("Id", Convert.ToInt32(SelectedID.ToString()));
            cmd.Connection = conn;
            SqlDataReader dr = cmd.ExecuteReader();
            DataTable dt = new DataTable();
            dt.Load(dr);
            DetailsView1.DataSource = dt;
            DetailsView1.DataBind();
        }
        private void UpdateGridView()
        {            
//            AjaxControlToolkit.HTMLEditor.Editor Editor = ((AjaxControlToolkit.HTMLEditor.Editor)DetailsView1.FindControl("Editor1"));
            TextBox Editor1 = ((TextBox)DetailsView1.FindControl("Editor1"));
            SqlConnection conn = new SqlConnection(WebConfigurationManager.ConnectionStrings["MyConn"].ConnectionString);
            SqlCommand cmd = new SqlCommand("UPDATE [Pages] SET [PageContent] = @PageContent WHERE (Id = @Id)");
            conn.Open();
            cmd.Parameters.AddWithValue("Id", Convert.ToInt32(DetailsView1.SelectedValue.ToString()));
            cmd.Parameters.AddWithValue("PageContent", Editor1.Text.ToString());
            cmd.Connection = conn;
            cmd.ExecuteNonQuery();
            conn.Close();
        }

        protected void DetailsView_ItemUpdated(object sender, DetailsViewUpdateEventArgs e)
        {
            UpdateGridView();
            GridViewDataBind();
            SelectPane.Attributes.Add("style", "display:normal;");
            editpane.Attributes.Add("style", "display:none;");
        }

        protected void LinkButton2_Click(object sender, EventArgs e)
        {
            SelectPane.Attributes.Add("style", "display:normal;");
            editpane.Attributes.Add("style", "display:none;");
        }

        protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
        {
            DetailsViewDataBind(GridView1.SelectedValue.ToString());
            SelectPane.Attributes.Add("style", "display:none;");
            editpane.Attributes.Add("style", "display:normal;");
        }
        protected void saveFile(object sender, AjaxControlToolkit.AjaxFileUploadEventArgs e)
        {
            // Save your File               
            heeEditor1.AjaxFileUpload.SaveAs(Server.MapPath("~/Assets/Images/" + e.FileName));

            // Tells the HtmlEditorExtender where the file is otherwise it will render as: <img src="" />
            e.PostedUrl = Server.MapPath("~/Assets/Images/" + e.FileName);
        }
    }
}

Ajax Version: v4.0.30319

File Upload stops working after adding AJAX panel

$
0
0

Hi folks, using WebForms, apparently as soon as you add an AJAX panel where there is a file upload control it breaks.  By moving the Submit button outside of the panel and setting it as a Trigger the upload works again but the UpdateProgress panel does not work presumably because the page is posting back!

The point of adding the progress was that the upload may take a while, so is there a simple solution for this or do I need to rewrite it for the AsyncFileUpload control in the toolbox?

Question About ScriptResource.axd? Pages Created When Using Ajax Controls

$
0
0

Windows Server 2008 R2.  IIS 7.  Visual Studio 2012.  AJAX Controls 7.1213.

AFTER I installed the version 7.1213 Ajax toolkit, I notice when I run (in debug mode) my web site and a page comes up that has a Ajax tab controldozens of pages (or instances of a page) come up.  They say ScriptResource.axd?xxxxxxx, where xxxxxxx is a bunch of cryptic letters and symbols.  In one instanceI counted 160 of these entries under the name of the page being displayed.  Is this to be expected?  Why.  When running the same pages with the same tab control under anold version of the Ajax toolkit, I only see three (3) of these instances come up when I browse to a page.

Also, I was getting an error until I shut it off that said something about "this" not being a valid word in a javascript.  Sorry I did not (and cannot now) snag the whole text of the error.

Page That Contains a Tab Control Errors Out Since Upgrading to 7.1213

$
0
0

Windows Server 2008 R2.  IIS 7.  Visual Studio 2012.

I upgraded to 7.1213.  When I work with the web site in the Visual Studio (in debug mode), everything runs fine.  When I move the site to our IIS server, I get the following error wherever I try to browse to a page with a tab control.  I have .Net Framework 3.5 installed on the web server (as well as 4.0, 4.4, and 4.5.1).  The application pool for the site is set to  .NET Framework v2.0.50727, but I understand that the 3.5 stuff is covered under this (3.5 is not one of the selections for framework even though installed). What do I need to do to fix the error below?

Server Error in '/' Application.


Security Exception

             Description:The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.            
Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
                  

Stack Trace:

[SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
   System.Reflection.Assembly._GetType(String name, Boolean throwOnError, Boolean ignoreCase) +0
   System.Web.UI.NamespaceTagNameToTypeMapper.GetControlType(String tagName, IDictionary attribs, Boolean throwOnError) +209
   System.Web.UI.TagPrefixTagNameToTypeMapper.System.Web.UI.ITagNameToTypeMapper.GetControlType(String tagName, IDictionary attribs) +210
   System.Web.UI.MainTagNameToTypeMapper.GetControlType2(String tagName, IDictionary attribs, Boolean fAllowHtmlTags) +242
   System.Web.UI.MainTagNameToTypeMapper.GetControlType(String tagName, IDictionary attribs, Boolean fAllowHtmlTags) +17
   System.Web.UI.RootBuilder.GetChildControlType(String tagName, IDictionary attribs) +22
   System.Web.UI.ControlBuilder.CreateChildBuilder(String filter, String tagName, IDictionary attribs, TemplateParser parser, ControlBuilder parentBuilder, String id, Int32 line, VirtualPath virtualPath, Type& childType, Boolean defaultProperty) +119
   System.Web.UI.TemplateParser.ProcessBeginTag(Match match, String inputText) +605
   System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding) +1334
                  

Version Information: Microsoft .NET Framework Version:2.0.50727.5477; ASP.NET Version:2.0.50727.5483

ExtededCalendar not working

$
0
0

i cannot get the calendar to work even after all the examples i found online.  it works when i run the preview from my development machine but when i upload it to the server it does not work.

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="AddProjectTask.aspx.vb" Inherits="CTiOnline4.AddProjectTask" %><%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %><!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"><meta charset="utf-8" /><meta http-equiv="X-UA-Compatible" content="IE=edge" /><meta name="viewport" content="width=device-width, initial-scale=1" /><link rel="stylesheet" href="styles.css" /><script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script><script src="script.js"></script></head><body><form id="form1" runat="server" style="border: thin solid #999999; background-color: #f9f9f9"><asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></asp:ToolkitScriptManager><td class="auto-style6" style="font-family: Arial; font-size: x-small; text-transform: uppercase; text-align: right;" colspan="2">
                Expected Completion:</td><td class="auto-style11" style="vertical-align: middle; ">   <asp:TextBox ID="ecdTxtBox" runat="server" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" Width="30%"></asp:TextBox><asp:CalendarExtender ID="CalendarExtender1" runat="server"
          TargetControlID="ecdTxtBox" Format="yyyy-MM-dd"></asp:CalendarExtender></td>

Not sure what I'm missing: I'm just trying to get a calendar selection that will format it by yyyy-MM-dd but i can't get the calendar to popup

ModalPopup not showing (with AutoCompleteExtender)

$
0
0

Hello. I am developing an aspx in VB 2012 and this is connected in a master page.

On this page, I have modalpopup, the panel that is connected to the popup has a textbox, an autocompleteextender and a button. 

The modalpopup is does not show, but once i remove the autocompleteextender, it works fine. But I need the autoocmpleteextender for my project.

I think the autocomplete extender conflicts with something that I cant trace.

Can somebody help me with this? 

I am using ASP.Net 2.0 and C# 2005 in .NET Framework 4.0 , AjaxControlToolkit


Ajax Jquery + HTML Partial View and Error Message Handling

$
0
0

Perhaps someone has already asked this.  I am new to ajax and would need assistance in handling and linking ajax jquery with MVC ModelState.AddModelError.  I would like the message in ModelState.AddModelError to be displayed as an alert in the error or success function of ajax jquery.  As a background, the general method is that once the controller is called, it will return a PartialView to the ajax jquery to display in a particular <div>.  If there is an error, the message should be displayed as an alert and there should be no change to whatever is currently displayed.

Below is a sample simple controller (HttpPost) and the ajax jquery routine. 

Controller:

        [Authorize]
        [HttpPost]
        public PartialViewResult Add()
        {
            int currentUser = (int)WebSecurity.CurrentUserId;
            Book myBook = new Book();

            myBook.GetChapter(currentUser, "Draft");

            if (myBook.Chapters.Count() > 3)
            {
                ModelState.AddModelError("", "Too many chapters.");
            }

            return PartialView(myBook);           
        }

The ajax call to post:

   function submitaddbook() {$.ajax({
            url: '@Url.Action("Add", "Book")',
            type: "Post",
            data: $('#addchapter').serialize(),
            success: function (data) {$("#notes").html(data); 
            },
            error: function (data) {
                alert(data.errormessage);
            }
        });
    }

Get Error About Can't Find ScriptControlBase.cs

$
0
0

Visual Studio 2012.  VBA.

When stepping through code with the debugger, I get a tab that comes up telling me it canot find ScriptControlBase.cs and asking me to browse and find it.  The only place I could find such a file was in an old version of the Ajax Control Toolkit (2008).  Any help would be appreciated.  Thanks.

ValidatorCalloutExtender for Arabic Page

$
0
0

I am using AjaxControlToolKit ValidatorCalloutExtender on my web page(which is RighttoLeft page), the issue is that the callout popup is always displayed to the right of the textbox I would like to display in Left.

Check if user exists before proceeding. This is not working.

$
0
0

I think I am losing.

We have a requirement. Before a user signs up for a new account, ask the user to select a username. As soon as mouse leaves the box, the value the user entered is verified against the database. If the username the user entered exists on our database, display a message to the user that that name already exists and disable submit button.

If the username does not exist, display a message to the user advising the user to proceed and enable submit button.

So far, everything is working except that if I validate against a name that already exists on the database, I get a message that the name is available.

This is wrong. It should display a message that that name is taken.

Conversely, if I enter a name that doesn't exist on the db, no message is displayed.

What piece am I missing?

//Markup

<body><form id="form1" runat="server"><asp:ScriptManager runat="server" ID="sm1" /><script language="javascript" type="text/javascript">
      // Hook the InitializeRequest event.
      Sys.WebForms.PageRequestManager.getInstance().add_initializeRequest(InitializeRequest);

      function InitializeRequest(sender, args) {
          // Change div's CSS class and text content.
          $get('UserAvailability').className = 'progress';$get('UserAvailability').innerHTML = 'Checking availability...';$get('Button1').disabled = true;
      }</script><asp:UpdatePanel runat="server" ID="up1"><ContentTemplate><label>Username:</label> <asp:TextBox runat="server" id="txtUserName" AutoPostBack="true" OnTextChanged="CheckUserNameAvailability" /><div runat="server" id="UserAvailability"></div><br /></ContentTemplate></asp:UpdatePanel><label>Password:</label> <asp:TextBox runat="server" ID="txtpwd" TextMode="password" /><br /><label>Confirm:</label> <asp:TextBox runat="server" ID="PasswordConfirm" TextMode="password" /><br /><br /><asp:UpdatePanel runat="server" ID="up2"><ContentTemplate><asp:Button runat="server" ID="Button1" Text="Sign me up!" Enabled="false" /></ContentTemplate></asp:UpdatePanel><asp:Label ID="lblmsg" runat="server"></asp:Label></form></body></html>

Codebehind:

    Protected Sub CheckUserNameAvailability(ByVal sender As Object, ByVal e As EventArgs)
        Dim conn As New SqlConnection(ConfigurationManager.ConnectionStrings("DBConnectionString").ConnectionString)
        Dim cmd As New SqlCommand("select * from tblLogin where username=@user", conn)
        cmd.Parameters.AddWithValue("@user", txtUserName.Text)
        conn.Open()
        Dim dr As SqlDataReader
        System.Threading.Thread.Sleep(3000)
        dr = cmd.ExecuteReader()
        If dr.Read() Then
            If txtUserName.Text = dr("username").ToString() Then
                UserAvailability.InnerText = "Username taken, sorry."
                UserAvailability.Attributes.Add("class", "taken")
                Button1.Enabled = False
            Else
                UserAvailability.InnerText = "Username available!"
                UserAvailability.Attributes.Add("class", "available")
                Button1.Enabled = True
            End If
        End If
    End Sub

Thanks a lot in advance

Javascript Will Not Work on Page with Ajax Tab Control. Works on Page Without Tab Control.

$
0
0

Visual Studio 2012.

I have an ASPX page that has a masterpage behind it.  So the page has all its elements between an <asp:content> and </asp:content>.  I am using the Ajax control toolkit tab control on the page as well, moving stuff from other pages onto tab panels on the newly designed page.  The other pages have javascript, such as found below.  However, it seems that no matter where I place the scripts on the new page (whether just after the <asp:content>, just before the </asp:content>, or somewhere near the control that uses it inside the tab control, the system seems to never sees the script and cannot find the function.  Any ideas of what I can do to solve this issue? (I have added a comment after the script.  Please read)

Here is the script in question:

<script type="text/jscript">
        function calcTotalHours() {
            var TotalHours = document.getElementById('<%= EditForm.Findcontrol("TotalFacHoursTextBox").ClientId %>');
            var Hours = ['<%= EditForm.Findcontrol("SundayHoursTextBox").ClientId %>', '<%= EditForm.Findcontrol("MondayHoursTextBox").ClientId %>', '<%= EditForm.Findcontrol("TuesdayHoursTextBox").ClientId %>', '<%= EditForm.Findcontrol("WednesdayHoursTextBox").ClientId %>', '<%= EditForm.Findcontrol("ThursdayHoursTextBox").ClientId %>', '<%= EditForm.Findcontrol("FridayHoursTextBox").ClientId %>', '<%= EditForm.Findcontrol("SaturdayHoursTextBox").ClientId %>'];
            var total = 0;
            for (var i = 0; i <= 6; i++) {
                if (!isNaN(document.getElementById(Hours[i]).value) && document.getElementById(Hours[i]).value != "") {
                    total += eval(document.getElementById(Hours[i]).value);
                }
            }
            TotalHours.value = total;
        }</script>

When I place the script in a separate .js file and code the top of the page this way, it finds the function.  But the values of elements on the page are not found where Hours= is set above.
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="Server">
    <script type="text/javascript" src="ReportsScript.js"></script>

Viewing all 5678 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>