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

AjaxFileUpload randomly stopped working everywhere

$
0
0

Hi,

I have a strange problem which I can't figure out how to fix.

I've been using the AjaxFileUpload control recently (source code below).

<ajaxToolkit:AjaxFileUpload ID="ajaxFileUpload" runat="server" ThrobberID="MyThrobber" Width="500" OnUploadComplete="ajaxFileUpload_OnUploadComplete" /><asp:Image ID="MyThrobber" runat="server" ImageUrl="~/App_Themes/Style/AJAXLoading/uploading.gif" Style="display: None" />
protected void ajaxFileUpload_OnUploadComplete(object sender, AjaxControlToolkit.AjaxFileUploadEventArgs e)
{
        // Generate file path
        string strFilePath = "~/FileUploads/" + e.FileName;
        // Save upload file to the file system
        ajaxFileUpload.SaveAs(MapPath(strFilePath));
}

Web Config I have added:

<configuration><configSections><sectionGroup name="system.web"><section name="sanitizer" requirePermission="false" type="AjaxControlToolkit.Sanitizer.ProviderSanitizerSection, AjaxControlToolkit"/></sectionGroup></configSections><system.web><compilation debug="true" targetFramework="4.5"/><httpRuntime targetFramework="4.5"/><sanitizer defaultProvider="HtmlAgilityPackSanitizerProvider"><providers><add name="HtmlAgilityPackSanitizerProvider" type="AjaxControlToolkit.Sanitizer.HtmlAgilityPackSanitizerProvider"/></providers></sanitizer><httpHandlers><add verb="*" path="AjaxFileUploadHandler.axd" type="AjaxControlToolkit.AjaxFileUploadHandler, AjaxControlToolkit"/></httpHandlers></system.web><system.webServer><handlers><add name="AjaxFileUploadHandler" verb="*" path="AjaxFileUploadHandler.axd" type="AjaxControlToolkit.AjaxFileUploadHandler, AjaxControlToolkit" /></handlers><security><requestFiltering><requestLimits maxAllowedContentLength="4294967295"/></requestFiltering></security></system.webServer></configuration>

It was working fine up until yesterday but then randomly stopped working. I can select file/s however they just stay at pending and nothing happens.

I decided to download the AjaxControlToolkit sample website just to try and get a working version, however suffered the same problem. I even visited the actual online sample site - http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/ajaxFileUpload/ajaxFileUpload.aspx and found that the control has stopped working online for me (it was working previously). I have tried on Firefox, Chrome and IE.

Does anyone have any ideas how to fix this as I'm really confused as to why it has suddenly stopped working? Do I need to reset something in order to get the control to function again?

Thanks,

Daniel


Is there any way for accessing Application Object in ScriptReference of AjaxControlToolKitScriptManager

$
0
0

Hi,

I'm trying to add scripts of Telerik to AjaxControlToolKitScriptManager . I want to use an Application Object for Mentioning path to ScriptReference  like

Path= "<%= Application["JavaScript" %>/Telerik/Core.js"/>  But It is not allowing me to do so . Please help me in fixing this issue.

 <ajaxToolkit:ToolkitScriptManager ID="scriptManager" OnAsyncPostBackError="OnAsyncError" AsyncPostBackTimeout="2000" EnablePageMethods="true" EnablePartialRendering="true" runat="server" CombineScripts="true">
<asp:ScriptReference Path="~/JavaScript/Telerik/Core.js"/>,
                <asp:ScriptReference Path="~/JavaScript/Telerik/Ajax.js"/>,
                <asp:ScriptReference Path="~/JavaScript/Telerik/jQuery.js"/>,
                <asp:ScriptReference Path="~/JavaScript/Telerik/jQueryPlugins.js"/>,
                <asp:ScriptReference Path="~/JavaScript/Telerik/RadGridScripts.js"/>,
                <asp:ScriptReference Path="~/JavaScript/Telerik/GridCellSelection.js"/>,
                <asp:ScriptReference Path="~/JavaScript/Telerik/TouchScrollExtender.js"/>,
                <asp:ScriptReference Path="~/JavaScript/Telerik/OverlayScript.js"/>,
                <asp:ScriptReference Path="~/JavaScript/Telerik/NavigationScripts.js"/>,
                <asp:ScriptReference Path="~/JavaScript/Telerik/AnimationScripts.js"/>,
                <asp:ScriptReference Path="~/JavaScript/Telerik/RadComboBoxScripts.js"/>,
                <asp:ScriptReference Path="~/JavaScript/Telerik/RadMenuScripts.js"/>,
                <asp:ScriptReference Path="~/JavaScript/Telerik/RadContextMenuScripts.js"/>,
                <asp:ScriptReference Path="~/JavaScript/Telerik/RadFilterScripts.js"/>,
                <asp:ScriptReference Path="~/JavaScript/Telerik/RadMenuItem.js"/>,
                <asp:ScriptReference Path="~/JavaScript/Telerik/RadAutoCompleteBoxScripts.js"/>,
                <asp:ScriptReference Path="~/JavaScript/Telerik/PopUpScripts.js"/>,
                <asp:ScriptReference Path="~/JavaScript/Telerik/RadToolTipScripts.js"/>,
                <asp:ScriptReference Path="~/JavaScript/Telerik/RadToolTipManager.js"/>,
                <asp:ScriptReference Path="~/JavaScript/Telerik/RadInputScript.js"/>,
                <asp:ScriptReference Path="~/JavaScript/Telerik/RadDateInputScript.js"/>,
                <asp:ScriptReference Path="~/JavaScript/Telerik/RadCalendarCommonScript.js"/>,
                <asp:ScriptReference Path="~/JavaScript/Telerik/RadCalendarScript.js"/>,
                <asp:ScriptReference Path="~/JavaScript/Telerik/RadDatePicker.js"/>,
                <asp:ScriptReference Path="~/JavaScript/Telerik/RadPickersPopupDirectionEnumeration.js"/>,
                <asp:ScriptReference Path="~/JavaScript/Telerik/RadInputManagerScript.js"/>
</ajaxToolkit:ToolkitScriptManager>





AjaxControlToolkit Tabs not working in IE8

$
0
0

Earlier thread on this problem is locked but I am still looking for a solution.  Try the simplest possible code with the Tabs control and you get a blank page in IE8:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TabsSample.Default" %><!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"><title></title></head><body><form id="form1" runat="server"><ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" /><div><ajaxToolkit:TabContainer runat="server" 
        Height="150px"
        Width="400px"
        ActiveTabIndex="0"        
        OnDemand="true"        
        AutoPostBack="false"
        TabStripPlacement="Top"
        CssClass="ajax__tab_xp"
        ScrollBars="None"
        UseVerticalStripPlacement="false"><ajaxToolkit:TabPanel runat="server" 
        HeaderText="Labs"
        Enabled="true"
        ScrollBars="Auto"        
        OnDemandMode="Once"><ContentTemplate>
            Lab test results go here</ContentTemplate></ajaxToolkit:TabPanel><ajaxToolkit:TabPanel runat="server" 
        HeaderText="Radiology"
        Enabled="true"
        ScrollBars="Auto"        
        OnDemandMode="Once"><ContentTemplate>
            Radiology results go here</ContentTemplate></ajaxToolkit:TabPanel><ajaxToolkit:TabPanel runat="server" 
        HeaderText="Medical"
        Enabled="true"
        ScrollBars="Auto"        
        OnDemandMode="Once"><ContentTemplate>
            Medical test results go here</ContentTemplate></ajaxToolkit:TabPanel></ajaxToolkit:TabContainer></div></form></body></html>

Dynamically added button click event fire only once!

$
0
0

Hi

Well, it may seem a repetitious and old problem, but I could not find any solution to it. I am writing a web application which has many forms all working fine with AJAX, except one. This form has two query panels and two parts for adding and editing items. One query panel is for searching through existing items and the other is for helping add/edit process. The entire form ASP.NET code is:

<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Masters/Forms.Master" CodeBehind="EditBrands.aspx.vb" Inherits="PharmaManageWeb.EditBrands" %><asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"><title>ویرایش برندها</title></asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="PageContent" runat="server"><asp:ScriptManagerProxy runat="server" ID="PageScriptsProxy"></asp:ScriptManagerProxy><asp:Table runat="server" CssClass="formtable"><asp:TableRow runat="server"><asp:TableCell runat="server"><asp:UpdatePanel runat="server" ID="AddPanel" UpdateMode="Conditional"><ContentTemplate><asp:Table runat="server" ID="AddTable" CssClass="formtable"><asp:TableRow runat="server"><asp:TableCell runat="server" ColumnSpan="2">افزودن برند:
								</asp:TableCell></asp:TableRow><asp:TableRow runat="server"><asp:TableCell runat="server">نام:
								</asp:TableCell><asp:TableCell runat="server"><asp:TextBox runat="server" ID="AddName" CssClass="rtlinput" Width="250px"></asp:TextBox></asp:TableCell></asp:TableRow><asp:TableRow runat="server"><asp:TableCell runat="server">کد ژنریک:
								</asp:TableCell><asp:TableCell runat="server"><asp:TextBox runat="server" ID="AddCode" CssClass="ltrinput" Width="100px"></asp:TextBox></asp:TableCell></asp:TableRow><asp:TableRow runat="server"><asp:TableCell runat="server">نام ژنریک:
								</asp:TableCell><asp:TableCell runat="server"><asp:TextBox runat="server" ID="AddGName" CssClass="ltrinput" Width="250px" Enabled="false"></asp:TextBox></asp:TableCell></asp:TableRow><asp:TableRow runat="server"><asp:TableCell runat="server">&nbsp;</asp:TableCell><asp:TableCell runat="server"><asp:Label runat="server" ID="AddErrMsg" ForeColor="Red"></asp:Label></asp:TableCell></asp:TableRow><asp:TableRow runat="server"><asp:TableCell runat="server">&nbsp;</asp:TableCell><asp:TableCell runat="server" CssClass="buttoncell"><asp:Button runat="server" ID="SubmitAdd" Text="ارسال" OnClick="DoAdd" /></asp:TableCell></asp:TableRow></asp:Table></ContentTemplate></asp:UpdatePanel><br /><asp:UpdatePanel runat="server" ID="EditPanel" UpdateMode="Conditional"><Triggers><asp:AsyncPostBackTrigger ControlID="SubmitAdd" EventName="Click" /></Triggers><ContentTemplate><asp:Table runat="server" ID="EditTable" CssClass="formtable"><asp:TableRow runat="server"><asp:TableCell runat="server" ColumnSpan="2">ویرایش برند:
								</asp:TableCell></asp:TableRow><asp:TableRow runat="server"><asp:TableCell runat="server">نام:
								</asp:TableCell><asp:TableCell runat="server"><asp:TextBox runat="server" ID="EditName" CssClass="rtlinput" Width="250px"></asp:TextBox></asp:TableCell></asp:TableRow><asp:TableRow runat="server"><asp:TableCell runat="server">کد ژنریک:
								</asp:TableCell><asp:TableCell runat="server"><asp:TextBox runat="server" ID="EditCode" CssClass="ltrinput" Width="100px"></asp:TextBox></asp:TableCell></asp:TableRow><asp:TableRow runat="server"><asp:TableCell runat="server">نام ژنریک:
								</asp:TableCell><asp:TableCell runat="server"><asp:TextBox runat="server" ID="EditGName" CssClass="ltrinput" Width="250px" Enabled="false"></asp:TextBox></asp:TableCell></asp:TableRow><asp:TableRow runat="server"><asp:TableCell runat="server">&nbsp;</asp:TableCell><asp:TableCell runat="server"><asp:Label runat="server" ID="EditErrMsg" ForeColor="Red"></asp:Label></asp:TableCell></asp:TableRow><asp:TableRow runat="server"><asp:TableCell runat="server">&nbsp;</asp:TableCell><asp:TableCell runat="server" CssClass="buttoncell"><asp:Button runat="server" ID="SubmitEdit" Text="ارسال" OnClick="DoEdit" Enabled="false" /></asp:TableCell></asp:TableRow></asp:Table></ContentTemplate></asp:UpdatePanel><br /><asp:UpdatePanel runat="server" ID="QueryPanel" UpdateMode="Conditional"><ContentTemplate><asp:Table runat="server" ID="QueryTable" CssClass="formtable"><asp:TableRow runat="server"><asp:TableCell runat="server" ColumnSpan="3">جستجوی برندها:
								</asp:TableCell></asp:TableRow><asp:TableRow runat="server"><asp:TableCell runat="server" Width="20px">نام:
								</asp:TableCell><asp:TableCell runat="server" Width="150px"><asp:TextBox runat="server" ID="QueryName" CssClass="rtlinput" Width="250px"></asp:TextBox></asp:TableCell><asp:TableCell runat="server" CssClass="buttoncell"><asp:Button runat="server" ID="SubmitQuery" Text="ارسال" OnClick="DoQuery" /></asp:TableCell></asp:TableRow><asp:TableRow runat="server"><asp:TableCell runat="server" ColumnSpan="3"><asp:Label runat="server" ID="QueryErrMsg" ForeColor="Red"></asp:Label></asp:TableCell></asp:TableRow><asp:TableRow runat="server"><asp:TableCell runat="server" ColumnSpan="3"><asp:Table runat="server" ID="QueryResults" CssClass="resulttable"></asp:Table></asp:TableCell></asp:TableRow></asp:Table></ContentTemplate></asp:UpdatePanel></asp:TableCell><asp:TableCell runat="server">انتخاب کدهای ژنریک:<br /><br /><asp:UpdatePanel runat="server" ID="GQueryPanel" UpdateMode="Conditional"><ContentTemplate><asp:Table runat="server" ID="GQueryTable" CssClass="formtable"><asp:TableRow runat="server"><asp:TableCell runat="server" ColumnSpan="3">جستجوی کدها:
								</asp:TableCell></asp:TableRow><asp:TableRow runat="server"><asp:TableCell runat="server" Width="20px">نام:
								</asp:TableCell><asp:TableCell runat="server" Width="150px"><asp:TextBox runat="server" ID="GQueryName" CssClass="ltrinput" Width="250px"></asp:TextBox></asp:TableCell><asp:TableCell runat="server" CssClass="buttoncell"><asp:Button runat="server" ID="GSubmitQuery" Text="ارسال" OnClick="DoGQuery" /></asp:TableCell></asp:TableRow><asp:TableRow runat="server"><asp:TableCell runat="server" ColumnSpan="3"><asp:Label runat="server" ID="GQueryErrMsg" ForeColor="Red"></asp:Label></asp:TableCell></asp:TableRow><asp:TableRow runat="server"><asp:TableCell runat="server" ColumnSpan="3"><asp:Table runat="server" ID="GQueryResults" CssClass="resulttable"></asp:Table></asp:TableCell></asp:TableRow></asp:Table></ContentTemplate></asp:UpdatePanel></asp:TableCell></asp:TableRow></asp:Table></asp:Content>

And the code behind:

Public Class EditBrands
    Inherits System.Web.UI.Page

	Private Sub Re_CreateQueryResults(ByVal dbc As SqlConnection)
		Dim qry As Base.Brands = Base.Brand.QueryBrands(dbc, Session("BrandQueryVal"))
		Dim i As Integer
		Dim tr As TableRow
		Dim tc As TableCell
		Dim bt As Button

		QueryResults.Rows.Clear()
		tr = New TableRow
		tc = New TableCell
		tc.Text = "شناسه"
		tc.CssClass = "resulttableordercol"
		tr.Cells.Add(tc)
		tc = New TableCell
		tc.Text = "نام"
		tc.CssClass = "resulttabledatacol"
		tr.Cells.Add(tc)
		tc = New TableCell
		tc.Text = "ویرایش"
		tc.CssClass = "resulttableordercol"
		tr.Cells.Add(tc)
		QueryResults.Rows.Add(tr)
		For i = 0 To qry.Count - 1
			tr = New TableRow
			tc = New TableCell
			tc.Text = qry(i).ID
			tc.CssClass = "resulttableordercol"
			tr.Cells.Add(tc)
			tc = New TableCell
			tc.Text = qry(i).Name
			tc.CssClass = "resulttabledatacol"
			tr.Cells.Add(tc)
			tc = New TableCell
			bt = New Button
			bt.Text = "ویرایش"
			bt.ID = "SubmitEdit" & qry(i).ID
			AddHandler bt.Click, AddressOf SubmitForEdit
			tc.Controls.Add(bt)
			tc.CssClass = "resulttableordercol"
			tr.Cells.Add(tc)
			QueryResults.Rows.Add(tr)
		Next
		If qry.Count = 0 Then
			QueryErrMsg.Text = SystemSys.SysMan.GetSystemMessage(dbc, "NOTHINGFOUND")
			QueryResults.Rows.Clear()
		End If
	End Sub

	Private Sub Re_CreateGQueryResults(ByVal dbc As SqlConnection)
		Dim qry As StatBookManager.GenericNames = StatBookManager.GenericName.QueryGenericNames(dbc, Session("GenericQueryVal3"))
		Dim i As Integer
		Dim tr As TableRow
		Dim tc As TableCell
		Dim bt As Button

		GQueryResults.Rows.Clear()
		tr = New TableRow
		tc = New TableCell
		tc.Text = "کد"
		tc.CssClass = "resulttableordercol"
		tr.Cells.Add(tc)
		tc = New TableCell
		tc.Text = "نام"
		tc.CssClass = "resulttabledatacol"
		tr.Cells.Add(tc)
		tc = New TableCell
		tc.Text = "انتخاب برای"
		tc.ColumnSpan = 2
		tc.CssClass = "resulttableordercol"
		tr.Cells.Add(tc)
		GQueryResults.Rows.Add(tr)
		For i = 0 To qry.Count - 1
			tr = New TableRow
			tc = New TableCell
			tc.Text = qry(i).Code
			tc.CssClass = "resulttableordercol"
			tr.Cells.Add(tc)
			tc = New TableCell
			tc.Text = qry(i).Name
			tc.CssClass = "resulttabledatacolltr"
			tr.Cells.Add(tc)
			tc = New TableCell
			bt = New Button
			bt.Text = "افزودن"
			bt.ID = "SubmitForAdd" & qry(i).ID
			AddHandler bt.Click, AddressOf SubmitGForAdd
			ScriptManager.GetCurrent(Me.Page).RegisterAsyncPostBackControl(bt)
			tc.Controls.Add(bt)
			tc.CssClass = "resulttableordercol"
			tr.Cells.Add(tc)
			tc = New TableCell
			bt = New Button
			bt.Text = "ویرایش"
			bt.ID = "SubmitForEdit" & qry(i).ID
			AddHandler bt.Click, AddressOf SubmitGForEdit
			ScriptManager.GetCurrent(Me.Page).RegisterAsyncPostBackControl(bt)
			tc.Controls.Add(bt)
			tc.CssClass = "resulttableordercol"
			tr.Cells.Add(tc)
			GQueryResults.Rows.Add(tr)
		Next
		If qry.Count = 0 Then
			GQueryErrMsg.Text = SystemSys.SysMan.GetSystemMessage(dbc, "NOTHINGFOUND")
			GQueryResults.Rows.Clear()
		Else
			GQueryErrMsg.Text = ""
		End If
	End Sub

	Protected Sub DoGQuery(ByVal sender As Object, ByVal e As EventArgs)
		Dim dbc As SqlConnection = Connectivity.GetConnectionToDB(Session("DatabaseName"))

		GQueryErrMsg.Text = ""
		If GQueryName.Text.Trim = "" Then
			GQueryErrMsg.Text = SystemSys.SysMan.GetSystemMessage(dbc, "NOGENERICNAME")
			dbc.Close()
			Exit Sub
		End If

		Session("GenericQueryVal3") = GQueryName.Text
		Re_CreateGQueryResults(dbc)
		dbc.Close()
	End Sub

	Protected Sub SubmitGForAdd(ByVal sender As Object, ByVal e As EventArgs)
		MsgBox("A")
		Dim dbc As SqlConnection = Connectivity.GetConnectionToDB(Session("DatabaseName"))
		Dim itm As New StatBookManager.GenericName(dbc, Val(CType(sender, Button).ID.Substring(12)), StatBookManager.GenericName.IdentifyBy.ID)

		AddCode.Text = itm.Code
		AddGName.Text = itm.Name
		AddPanel.Update()
		dbc.Close()
	End Sub

	Protected Sub SubmitGForEdit(ByVal sender As Object, ByVal e As EventArgs)
		MsgBox("E")
		Dim dbc As SqlConnection = Connectivity.GetConnectionToDB(Session("DatabaseName"))
		Dim itm As New StatBookManager.GenericName(dbc, Val(CType(sender, Button).ID.Substring(13)), StatBookManager.GenericName.IdentifyBy.ID)

		EditCode.Text = itm.Code
		EditGName.Text = itm.Name
		EditPanel.Update()
		dbc.Close()
	End Sub

	Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
		If Not Page.IsPostBack Then
			If Session("GenericQueryVal3") IsNot Nothing Then
				Session.Remove("GenericQueryVal3")
				Exit Sub
			End If
		End If

		Dim dbc As SqlConnection = Connectivity.GetConnectionToDB(Session("DatabaseName"))

		If Page.IsPostBack AndAlso (Session("BrandQueryVal") IsNot Nothing) AndAlso (AJAXUtils.GetAsyncPostBackControlID(Me.Page, Request).EndsWith("$QueryPanel")) Then
			Re_CreateQueryResults(dbc)
			If QueryName.Text = "" Then QueryName.Text = Session("BrandQueryVal")
		End If
		If Page.IsPostBack AndAlso (Session("GenericQueryVal3") IsNot Nothing) AndAlso (AJAXUtils.GetAsyncPostBackControlID(Me.Page, Request).EndsWith("$GQueryPanel")) Then
			Re_CreateGQueryResults(dbc)
			If GQueryName.Text = "" Then GQueryName.Text = Session("GenericQueryVal3")
		End If
		dbc.Close()
	End Sub

	Protected Sub DoAdd(ByVal sender As Object, ByVal e As EventArgs)
		Dim dbc As SqlConnection = Connectivity.GetConnectionToDB(Session("DatabaseName"))

		AddErrMsg.Text = ""
		If AddName.Text.Trim = "" Then
			AddErrMsg.Text = SystemSys.SysMan.GetSystemMessage(dbc, "NOBRANDNAME")
			dbc.Close()
			Exit Sub
		End If
		If AddCode.Text.Trim = "" Then
			AddErrMsg.Text = SystemSys.SysMan.GetSystemMessage(dbc, "NOGENERICCODE")
			dbc.Close()
			Exit Sub
		End If

		Dim itm As New Base.Brand

		If Not itm.GenericName.Load(dbc, Val(AddCode.Text), StatBookManager.GenericName.IdentifyBy.Code) Then
			AddErrMsg.Text = SystemSys.SysMan.GetSystemMessage(dbc, "GENERICNOTFOUND")
			dbc.Close()
			Exit Sub
		End If

		itm.Name = AddName.Text
		itm.Register(dbc)
		AddName.Text = ""
		AddCode.Text = ""
		AddGName.Text = ""
		EditName.Text = ""
		EditCode.Text = ""
		EditGName.Text = ""
		SubmitEdit.Enabled = False
		dbc.Close()
	End Sub

	Protected Sub DoEdit(ByVal sender As Object, ByVal e As EventArgs)
		Dim dbc As SqlConnection = Connectivity.GetConnectionToDB(Session("DatabaseName"))
		Dim itm As New Base.Brand(dbc, Session("BrandEditID"))

		EditErrMsg.Text = ""
		If EditName.Text.Trim = "" Then
			EditErrMsg.Text = SystemSys.SysMan.GetSystemMessage(dbc, "NOBRANDNAME")
			dbc.Close()
			Exit Sub
		End If
		If EditCode.Text.Trim = "" Then
			EditErrMsg.Text = SystemSys.SysMan.GetSystemMessage(dbc, "NOGENERICCODE")
			dbc.Close()
			Exit Sub
		End If
		If Not itm.GenericName.Load(dbc, Val(EditCode.Text), StatBookManager.GenericName.IdentifyBy.Code) Then
			EditErrMsg.Text = SystemSys.SysMan.GetSystemMessage(dbc, "GENERICNOTFOUND")
			dbc.Close()
			Exit Sub
		End If

		itm.Name = EditName.Text
		itm.Save(dbc)
		EditName.Text = ""
		EditCode.Text = ""
		EditGName.Text = ""
		SubmitEdit.Enabled = False
		Re_CreateQueryResults(dbc)
		QueryPanel.Update()
		dbc.Close()
	End Sub

	Protected Sub DoQuery(ByVal sender As Object, ByVal e As EventArgs)
		Dim dbc As SqlConnection = Connectivity.GetConnectionToDB(Session("DatabaseName"))

		QueryErrMsg.Text = ""
		If QueryName.Text.Trim = "" Then
			QueryErrMsg.Text = SystemSys.SysMan.GetSystemMessage(dbc, "NOBRANDNAME")
			dbc.Close()
			Exit Sub
		End If

		Session("BrandQueryVal") = QueryName.Text
		Re_CreateQueryResults(dbc)
		dbc.Close()
	End Sub

	Protected Sub SubmitForEdit(ByVal sender As Object, ByVal e As EventArgs)
		Dim dbc As SqlConnection = Connectivity.GetConnectionToDB(Session("DatabaseName"))
		Dim itm As New Base.Brand(dbc, Val(CType(sender, Button).ID.Substring(10)))

		Session("BrandEditID") = itm.ID
		EditName.Text = itm.Name
		EditCode.Text = itm.GenericName.Code
		EditGName.Text = itm.GenericName.Name
		SubmitEdit.Enabled = True
		EditPanel.Update()
		Re_CreateQueryResults(dbc)
		dbc.Close()
	End Sub

	Private Sub EditBrands_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
		If Page.IsPostBack AndAlso (Session("GenericQueryVal3") IsNot Nothing) Then
			Dim dbc As SqlConnection = Connectivity.GetConnectionToDB(Session("DatabaseName"))

			Re_CreateGQueryResults(dbc)
			dbc.Close()
		End If
	End Sub
End Class

Dynamic add/edit buttons are added in Re_CreateGQueryResults() subroutine. As you see, I have added two MsgBox statements saying "A" when a dynamic add button is clicked, and "E" when a dynamic edit button is clicked. The problem is exactly here: when I click on a dynamic add button, MsgBox("A") works, but only for the first! Further clicks don't result in any further message boxes (and not in any change in contents of AddName, AddCode, AddGName), and other dynamic edit buttons don't work as well until session expiration (say, with a rebuild on ASP.NET Development Server). A similar behavior happens with first click on dynamic edit buttons (No further message boxes, neither by edit buttons nor add buttons).

Where is the problem?!

Thanks in advance.

Update panel timing out.

$
0
0

I'm writing a page that resets user passwords in Active Directory. It's a fairly long operation (between 3 and 4 minutes). There are four user groups consisting of about 1800 records. When I just reset one group, I have no issues but if I try to reset all four, it throws an error. I commented out the update panel and content template and the operation finished but then the GridView doesn't work. The script manager control is in the master. Is there some type of setting I need to add in the web.config?

Can I use AjaxFileUploader in Asp.Net 3.5 or 4.0 Application

$
0
0

I am making an Asp.Net 3.5 or 4.0 Application

Is there any way by which I can use AjaxFileUploader in it ?

Visual Studio 2010, Windows 7 Professional, IIS 7.5

ListBox inside a Repeater inside a modalpopup hides the modalpopup

$
0
0

Hello,

I have a Repeater inside a modalpopup, and ListBoxes inside the Repeater. The problem is, when I select an item in the ListBox the modalpopup hides. I'm under the impression that this isn't supposed to happen when the modalpopup's content is surrounded by an updatepanel. Also, this problem only started appearing a while ago. Here is a simplified code sample that produces the problem:

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc2" %><asp:HiddenField ID="hf1" runat="server" /><cc2:ModalPopupExtender ID="mpe_test" runat="server" TargetControlID="hf1"
    PopupControlID="panel_test" /><asp:Panel ID="panel_test" runat="server" Style="display: none; background-color: white; border: 1px solid black;"><asp:UpdatePanel runat="server"><ContentTemplate><asp:Repeater ID="rep_test" runat="server"><ItemTemplate><asp:ListBox ID="lb_inside" runat="server" AutoPostBack="true"><asp:ListItem Text="1" Value="1" /><asp:ListItem Text="2" Value="2" /></asp:ListBox><asp:DropDownList ID="ddl_inside" runat="server" AutoPostBack="true"><asp:ListItem Text="1" Value="1" /><asp:ListItem Text="2" Value="2" /></asp:DropDownList></ItemTemplate></asp:Repeater><asp:ListBox ID="lb_outside" runat="server" AutoPostBack="true"><asp:ListItem Text="1" Value="1" /><asp:ListItem Text="2" Value="2" /></asp:ListBox><asp:DropDownList ID="ddl_outside" runat="server" AutoPostBack="true"><asp:ListItem Text="1" Value="1" /><asp:ListItem Text="2" Value="2" /></asp:DropDownList></ContentTemplate></asp:UpdatePanel></asp:Panel><asp:Button ID="btn_test" runat="server" Text="test" OnClick="btn_test_click" />

protected void btn_test_click(object sender, EventArgs e)
{
    rep_test.DataSource = new List<int> { 1 };
    rep_test.DataBind();
    mpe_test.Show();
}

Selecting items from lb_outside or ddl_outside doesn't hide the modalpopup. When selecting items from lb_inside or ddl_inside, the behaviour interestingly depends on the browser:

- On Chrome, ListBox hides the modalpopup but DropDownList doesn't

- On IE, DropDownList hides the modalpopup but ListBox doesn't

- On Firefox, both of the controls hide the modalpopup

Calling mpe_test.Show() from OnSelectedIndexChanged-event doesn't help. Also, I noticed that removing the ID:s from lb_outside and ddl_outside causes lb_outside to start hiding the modalpopup in Chrome and Firefox and ddl_outside in IE and Firefox.

Any ideas what's going on?

Sending emails with the body based on RenderControl is generating errors

$
0
0

A few weeks back I posted looking for a way to send part of a html table in the body of an email from code behind.

The solution that works and was implemented was this logic:

StringBuilder sb = new StringBuilder();
            StringWriter sw = new StringWriter(sb);
            HtmlTextWriter hw = new HtmlTextWriter(sw);
            gvDetails.RenderControl(hw);
            string html = sb.ToString();

But we recently added a ajax extender "AutoCompleteExtender" to the form/html table which is part of the above render logic, and now we are getting an error when the users submit the page and the email logic is executed.

We are getting the following error on the gvDetails.RenderControl(hw);

Extender control is not a registered extender control. Extender controls must be registered using RegisterExtenderControl() before calling RegisterScriptDescriptors(). Parameter name: extenderControl

Is there something I can do prior to the render to prevent this? Is there a way to exclude the extender from the render since I don't really need to email the extender?

I mean I kinda understand why we get the error, but unclear on how to get passed this..

The error is more of a nuisance because the form is in fact being submitted and the data is being captured in the DB, but as far as the user is concerned it failed and didn't work.

 


The element 'buildProviders' cannot be defined below the application level

$
0
0
<div id=intelliTxt style="PADDING-RIGHT: 5px; PADDING-LEFT: 5px">Hi,

I just created my 1st trial website with Atlas.
Of course, it works fine on my development Windows XP machine.

Then I published it onto an ASP 2.0 enabled hoster and when launching the start page.aspx, got the following error:
====================
Parser Error Message: The element 'buildProviders' cannot be defined below the application level.

Source Error:

Line 60:     -->
Line 61:           <compilation debug="false">
Line 62:                <buildProviders>
Line 63:                     <add extension=".asbx" type="Microsoft.Web.Services.BridgeBuildProvider"/>
Line 64:                </buildProviders>
===============================

I swear I didn't touch the web.config file :-)
Of course, should I remove the <buildProviders> lines, I got another error.

Any clue?
 </div>

Combobox enable on Enter

$
0
0

Hi,

How can I enable my combobox on ENTER keypress. It triggers postback when i press on combox arrow. But i want when user enters the value and press ENTER to trigger the postback. The user types in the desired value and it automatically suggests the options. Then when user selects desired value I want selected item to fire the postback. Now, when I type in the combo the desired value I have to press twice the enter button to show the result. Or when I click on the highlighted item to trigger the postback. Is it possible? Thank you.

Here is the code:

<div class="divComGrid"><cc1:ComboBox ID="comPosition" Height="25px" Width="300px" AppendDataBoundItems="true"
        AutoCompleteMode="Suggest" AutoPostBack="True"
        runat="server" DataSourceID="rdCombo" MaxLength="0"
        DataTextField="Position" DropDownStyle="Simple"></cc1:ComboBox></div><asp:SqlDataSource ID="rdCombo" runat="server" ConnectionString="<%$ ConnectionStrings:CompanyInfoEventsConnectionString %>"
    SelectCommand="SELECT [Position] FROM [GpiEmployees] GROUP BY [Position]"></asp:SqlDataSource><br /><div class="divComGrid"><asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="grdPosition"
        EnableModelValidation="True"><Columns><asp:BoundField DataField="FullName" HeaderText="FullName" SortExpression="FullName" /><asp:BoundField DataField="GeocellCellar" HeaderText="GeocellCellar" SortExpression="GeocellCellar" /><asp:BoundField DataField="Extention" HeaderText="Extention" SortExpression="Extention" /><asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" /></Columns></asp:GridView></div><asp:SqlDataSource ID="grdPosition" runat="server" ConnectionString="<%$ ConnectionStrings:CompanyInfoEventsConnectionString %>"
    SelectCommand="SELECT [FullName], [GeocellCellar], [Extention], [Email] FROM [GpiEmployees] WHERE ([Position] = @Position)"><SelectParameters><asp:ControlParameter ControlID="comPosition" Name="Position" PropertyName="SelectedValue"
            Type="String" /></SelectParameters></asp:SqlDataSource>

How to update updatepanel from other updatepanel

$
0
0

I have a 2 button , 2 radio buttons   2 dropdowns. I have put every control in a separate update panel to restrict other control take part in 

asychronous postback. so that my page will be more smooth.

But I hv a situation where i want to hide the buttons on selection of radio button. Since I have wrapped radio button in a update panel so it is not updateing button which are wrapped in other update panel. I tried by writing updatepanel1.update() in radio selection event but it was giving error .

Kindly suggest?

<fieldset>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" >
<ContentTemplate>
<label id="Label1" runat="server">Select Corporation <span class="mandatory">*</span></label>
<asp:DropDownList ID="ddl1" DataTextField="--Select Client--" runat="server" AutoPostBack="true" TabIndex="1" OnSelectedIndexChanged="ddl1_SelectedIndexChanged">
<asp:ListItem Text="--Select Invoice No --" Value="-1" />
</asp:DropDownList>


</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ddl1" EventName="SelectedIndexChanged" />

</Triggers>
</asp:UpdatePanel>

<fieldset>
<asp:UpdatePanel ID="UpdatePanel2" runat="server" >
<ContentTemplate>
<label id="Label1" runat="server">Select Corporation <span class="mandatory">*</span></label>
<asp:DropDownList ID="ddl2" DataTextField="--Select Client--" runat="server" AutoPostBack="true" TabIndex="1" OnSelectedIndexChanged="ddl1_SelectedIndexChanged">
<asp:ListItem Text="--Select ponno --" Value="-1" />
</asp:DropDownList>


</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ddl2" EventName="SelectedIndexChanged" />

</Triggers>
</asp:UpdatePanel>

</fieldset>

<fieldset>

<asp:UpdatePanel ID="UpdatePanel3" runat="server" >
<ContentTemplate>
  <asp:Button ID="btnSave" CssClass="searchBtn" runat="server" Text="Save" TabIndex="5" OnClick="btnSave_Click" />

</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnSave" EventName="SelectedIndexChanged" />

</Triggers>
</asp:UpdatePanel>

</fieldset>

<fieldset>

<asp:UpdatePanel ID="UpdatePanel4" runat="server" >
<ContentTemplate>
  <asp:Button ID="btnClear" CssClass="searchBtn" runat="server" Text="Clear" TabIndex="5" OnClick="btnClear_Click" />

</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnClear" EventName="SelectedIndexChanged" />

</Triggers>
</asp:UpdatePanel>

</fieldset>

<fieldset>
<asp:UpdatePanel ID="UpdatePanel5" runat="server" >
<ContentTemplate>
  

<label id="lbMode" runat="server">Select Mode</label>

<asp:RadioButtonList ID="rblSelection" runat="server" RepeatLayout="Flow"
CssClass ="srRadio" RepeatDirection="Horizontal" AutoPostBack="true" OnSelectedIndexChanged="rblSelection_SelectedIndexChanged">
<asp:ListItem Text="Single" Value="0" Selected="True"></asp:ListItem>
<asp:ListItem Text="Multiple" Value="1"></asp:ListItem>
</asp:RadioButtonList>

</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="rblSelection" EventName="SelectedIndexChanged" />

</Triggers>
</asp:UpdatePanel>

</fieldset>

protected void rblSelection_SelectedIndexChanged(object sender, EventArgs e)
{

if (rblSelection.SelectedItem.ToString() == "Single")
{
clearControls();
btnSave.Visible = true;
btnClear.Visible = false;
updatepanel3.update();   updatepanel4.update();

}
else
{

clearControls();
btnSave.Visible = false;
btnClear.Visible = true;
updatepanel3.update();   updatepanel4.update();


}

protected void btnSave_Click(object sender, EventArgs e)

{

   //doing some stuff with drop downs

}

protected void btnClear_Click(object sender, EventArgs e)

{

   clearcontrols();

}

Hide the toolbar of HTMLEditorExtender?

$
0
0

I tried replying here:

http://forums.asp.net/t/1979205.aspx?How+to+remove+Toolbar+Of+HtmlEditorExtender+

I am able to include a button on my page to hide it manually, however I just want it disabled permanently. Is this possible? I tried the following:

<script type="text/javascript" language="javascript">$(".ajax__html_editor_extender_buttoncontainer").hide();</script>

But this does not work. I then tried this:

<input id="Button2" type="button" value="Hide" /><script type="text/javascript" language="javascript">$("#Button2").click(function () {$(".ajax__html_editor_extender_buttoncontainer").hide();
});$("#Button2").click();</script>

and this also doesn't work, although an alert placed inside the click handler seems to work just fine. inspecting the page source i'm noticing the toolbar object in question is nowhere to be ctrl+f'd -- 

other thoughts:

-the extender is inside an updatepanel, inside a user control. (.ascx)

any thoughts?

thanks in advance :D

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

show all child nod data based on parent node selection Rad Drop Down Tree

$
0
0

Hi,
I am new to rad dropdown tree. I want to show data from database based on selection in Rad dropdown tree. 
All I want that when a child node is selected it should show data based on that node selection (This scenario is working finebutwhen a parent node is selected it is not showing data based on all its child nodes.

Please note that each item in Rad Drop Down Tree have a unique product_type_id  and on bases of product_type_id  I am executing query to show result.


Thanks

partial page render after page load with out button click (without asynchronous call back)

$
0
0

Hi all , I have requirement of partial page rendering, but there is no buttons to click so I can call asynchronous trigger.

in my web page there is a panel to load with server side script. which make whole page load slow.  I am not sure how to call this server side script with out a button click.

I did few pages with forms including update panel and asynchronous triggers to load part of page. but in this case I need to load the rest of the page after page load complete call this server side script to fill the panel

any ideas please


Error in using Ajax Asynchronous File Uploader Control on IIS

$
0
0

Hello friends,

                   i am using ajax asynchronous file uploader control in my asp.net project to upload multiple files at a time, the control works fine at localhost and upload the files to the respective directories, but when i upload this control on iis with the same setting of web.config file at localhost, it dose not work and the control do not upload the files to the folders, please help me to resolve this issue as soon as possible.

Thanks and Regards,

Harnek Singh

Bar and pie Charts in .net 4.0

$
0
0

Hi All,

I am using VS2010 Professional,

I want to Develop Bar and Pie Charts but unfortunately I am unable to Use ASP Chart Control in My Web App,It is in disable mode in my Data tab in Toolbox but able to use it in Windows app.

So I tried to  develop charts using Jquery but all are Licensed version or free trial for one month ,I want to develop charts by using  freeware or  opensource.

Please help me on this.

Thanks,

Ravi Kumar raju N.

How to round-off values

$
0
0

Hi,

How to round-off values 339.79499999999996 To 339.7950 

I want output like 339.7950

thanks in advance

HTML element causes double postback in Web Form

$
0
0

I have a web form that I put a styled CSS <button> element on it. When I wired up the OnServerClick property to my codebehind, it gets called twice when the button is clicked. This does not happen on the <asp:Button> control. This seems to only pertain to the button element.

I found this post

https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=102775&wa=wsignin1.0

that states that the issue was verified in Visual Studio .NET 2005 (build:RTM.50727.42) and that is had been fixed. I have Version 8.0.50727.762 (SP.050727-7600) and this is still happening. I've also updated to the .NET Framework 2.0.50727.SP2

I saw some other posts in this forum regarding double postbacks, but none specific to the <button> element.

Is there an update or hotfix or any suggestion as to resolving this problem?

 

I can't see the toolbars in htmleditorextender

$
0
0

I have added the latest version of the AJax Control Toolkit and I am trying to add the htmleditor.  Any ideas?

I have already tried replacing script manager with toolscript manager.

Here is the code:

<asp:TextBox ID="txt_editor" runat="server" TextMode="MultiLine" Rows="5" Columns="10"></asp:TextBox>
<ajaxToolkit:HtmlEditorExtender runat="server" TargetControlID="txt_editor">


</ajaxToolkit:HtmlEditorExtender>

Viewing all 5678 articles
Browse latest View live




Latest Images