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

AjaxFileUpload Control does not work inside a Wizard

$
0
0

Hi, I need to put an AjaxFileUpload inside the step 3 of a wizard, the wizard is inside an update panel.  If I put the AjaxFileUpload control inside the update panel it works perfectly, as soon as I put it inside the wizard it gets broken, it gives me an error in IE and in Chrome it stays  pending and also never uploads the files.

Have anyone encountered problems using the AjaxFileUploadControl inside a Wizard? Any help is appreciated


UpdatePanelAnimationExtender

$
0
0

Hi All,

I have a search button and a grid view control which is inside the update panel!! i am using updatepanelanimationextender to fadeout all the control when the search is happening and show a progress bar at the middle,

Everything works fine when i click search button first time...How ever when i click the search button second time the progress bar loads continously and dont give any results, i have to refresh page and do all over again!!.

I am attaching the code here

<ajct:UpdatePanelAnimationExtender ID="upae1" runat="server" TargetControlID="upSearchPanel"><Animations><OnUpdating><Parallel duration="0"><EnableAction AnimationTarget="gv1" Enabled="false" /><EnableAction AnimationTarget="mvnoPaging" Enabled="false" /><EnableAction AnimationTarget="mvnoPagingTop" Enabled="false" /><ScriptAction Script="onUpdating();" /><FadeOut minimumOpacity=".5" /></Parallel></OnUpdating><OnUpdated><Parallel duration="0"><FadeIn minimumOpacity=".5" /><EnableAction AnimationTarget="gv1" Enabled="true" /><EnableAction AnimationTarget="mvnoPaging" Enabled="true" /><EnableAction AnimationTarget="mvnoPagingTop" Enabled="true" /><ScriptAction Script="onUpdated();" /></Parallel></OnUpdated></Animations></ajct:UpdatePanelAnimationExtender>

Also on button search click i am calling a _dopostback() function !!

 

Any help will be appreciated

 

Thanks

MaskedEditValidator and MaskedEditExtender

$
0
0

hello frnds

i use MaskedEditExtender for Date and MaskedEditValidator to validate date

1 want to add current date as Max.. value in MaskedEditValidator but how...?

Undecided

plzz gv me some suggestion

TabContainer is not visible

$
0
0

Hi,

   I have tab container with three tab panels working fine.When i place a modalpopup extender inside my one of the tab panel the entire page is displaying as blank.Is that anything i am missing.I am sitting on it for hours.Please help.

Regards,

Hsakarp

Ajax Modal popup Extender - Infinite Scroll bar Issue in IE 8

$
0
0

I am using Ajax Modal popup Extender(version4.0.30319) in my application.After Modal popup extender comes up, an infinte scroll bar is appearing in IE browser.

when i use scroll bars to see the popup the pagekeep on incrementing and I am ending up with unable to view the popup.

how to resolve it?

IDE: VS 2010.

This happens only in IE. Whereas firefox does not have any issues.


Could not load the assembly 'App_Web_ljt7xfcc'

$
0
0

Hi,

i tried to start a webapp with asp.net 3.5 sp1, but i get this error:

Line 1:  <%@ page language="VB" validaterequest="false" inherits="start, App_Web_ljt7xfcc" %>
Line 2: 
Line 3:  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Source File: /toets/start.aspx   Line: 1

Version Information: Microsoft .NET Framework Version:2.0.50727.3643; ASP.NET Version:2.0.50727.3634

Thanks for help

Banaba

 

How to Customize Font in HTMl Editor Extender

$
0
0

Hi

iam struggling with to add extra fonts in Htm editor Extender(Ajax Control kit) let me know  how  to customize font selector ............

please reply me sooon................its very urgent i need to include different fonts in that.

hope u guys reply me with a good answer 

In Webfroms, how to call Ajax via a JavaScript function?

$
0
0
<div>

Hi,

I'm working on a webforms app that was written 5 years ago. for 1 page, I need to add a function where when a user clicks a radio button, I need to go back to the server side, access db, do some calculation, then display a message to this user via a pop-up; BEFORE this user can proceed and go to next page.

I'm thinking that I should add a "onclick=..." to the radio button, which will run a javascript, which will then make an Ajax call inside the Javascript; tfrom there I can access the db, do the calculation, format data, then return the result and display it in an "alert" window.

Currently the radio button code in .aspx looks like this:

<asp TemplateField>

    <ItemTemplate>

          <input name ="ServiceSelected" type ="radio"

                     value = '<%# Container.DataItemIndex %>'

                     onload = "...."   

                     onclick=" ..."         ---> I'm thinking to add the "onclick" here, which will call a js function on this page

                     <%# IsChecked( ) %>

          </>

     </ItemTemplate>

I think that this approach should work; but I'm new to Ajax so I do not know the syntax  - e.g.:

1) can I insert a "Onclick" event here in the above code, like I did? If so, what is the correct way to call the JavaScript?

2) inside the JavaScript, how do I make a ajax call to access db? or I should somehow call a code behind function (in the .aspx.cs file)?

I'm open to suggestion on what is the simplest way to achieve my goal ... this code already works in prod., so I want to modify as little as possible.

If someone can provide some sample code on what I have listed above, or point me to an existing post, I'd appreciate it very much!

Thanks a lot!

Claudia

</div>

Issue with UpdatePanel inside a ModalPopupExtender Panel

$
0
0

I have a ModalPopupExtender that is firing and showing a Panel. Inside that Panel is an UpdatePanel. The Panel has some form fields on it to gather some info, the user clicks a Preview button (trigger button for UpdatePanel) and the code fires off without a hitch. Then when I go to close the ModalPopupExtender, I get the following error:

Microsoft JScript runtime error: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method.

With a button for Break, Continue, and Ignore.

Here is my ModalPopupExtender Call:

<ajaxToolkit:ModalPopupExtender runat="server" ID="ModalPopupExtender4" TargetControlID="btnSFHEnv" PopupControlID="PnlSFHEnvPopup" DropShadow="true" BackgroundCssClass="ModalPopupCSS" />

And my popup Panel:

<asp:Panel runat="server" ID="PnlSFHEnvPopup" Width="985px" BackColor="#74606c" ><table><tr><td><asp:Label ID="Label1" runat="server" Text="Custom Text 1" ForeColor="White" Font-Bold="true" /></td><td><asp:Label ID="Label3" runat="server" Text="Custom Text 2" ForeColor="White" Font-Bold="true" /></td><td><asp:Label ID="Label4" runat="server" Text="Custom Text 3" ForeColor="White" Font-Bold="true" /></td></tr><tr><td><asp:TextBox runat="server" ID="txtCustomEnv1" Width="150px" /></td><td><asp:TextBox runat="server" ID="txtCustomEnv2" Width="150px" /></td><td><asp:TextBox runat="server" ID="txtCustomEnv3" Width="150px" /></td></tr><tr><td colspan="3"><ajaxToolkit:TextBoxWatermarkExtender runat="server" ID="TextBoxWatermarkExtender1" TargetControlID="txtCustomEnv1" WatermarkText="123 Main St." WatermarkCssClass="Watermark"  /><ajaxToolkit:TextBoxWatermarkExtender runat="server" ID="TextBoxWatermarkExtender2" TargetControlID="txtCustomEnv2" WatermarkText="Suite 1000" WatermarkCssClass="Watermark"  /><ajaxToolkit:TextBoxWatermarkExtender runat="server" ID="TextBoxWatermarkExtender3" TargetControlID="txtCustomEnv3" WatermarkText="City, ST  ZipCode" WatermarkCssClass="Watermark"  /></td></tr><tr><td align="center" colspan="3"><asp:UpdatePanel runat="server" ID="UpdEnvPanel" UpdateMode="Conditional" ><Triggers><asp:AsyncPostBackTrigger ControlID="btnEnvPreview" EventName="Click" /></Triggers><ContentTemplate><table><tr><td><asp:Button runat="server" ID="btnEnvPreview" Text="Preview" 
                            onclick="btnEnvPreview_Click" /></td></tr><tr><td><asp:Image runat="server" ID="ImgSFHEnv_LG" ImageUrl="images/SFHEnv.jpg"/></td></tr></table></ContentTemplate></asp:UpdatePanel>                                                                                                       </td></tr><tr><td colspan="3"><asp:Button runat="server" ID="btnEnvAddToCart" Text="Add to Cart" onclick="btnEnvAddToCart_Click" 
                             /></td></tr>            </table>        </asp:Panel>

I tried stripping out all the excess code and it's not until I add the UpdatePanel that I start getting the error.

Ajax time doesn't work

$
0
0

Hello Everyone,

I used sql server 2005VS 2008aspvb.net andajax in my web form for date and time.  The date is working fine, but the time is not.  When I tried to save the data into the data tables, I encountered this "sqlTypeException was unhandled by user code" - sqlDateTime overflow.  Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM

Would someone please help me take a look at what I have below and give me some advice.  All of your help is greatly appreciated!  Thank you very much in advance!

I have 4 textboxes:
txtDateOccured 
txtTimeOccured
txtDateReported
txtTimeReported

I used sql server 2005 and I defined the data type as follows:  I also tried datetime datatype for TimeOccured and Time reported, but It did not work.
DateOccured - datetime
TimeOccured - nvarchar(11)
DateReported - datetime
TimeReported - nvarchar(11)

This is what I entered:
Date Occured: 05/16/2013  
Time Occured: 10:30:00 AM
Date Reported: 05/17/2013
Time Reported: 12:30:00 PM

<asp:ToolkitScriptManagerID="ToolkitScriptManager1"runat="server">
</asp:ToolkitScriptManager>

<asp:CalendarExtenderID="CalendarExtender1"runat="server"
TargetControlID="txtDateOccured"
PopupButtonID="Image1"
Format="d">
</asp:CalendarExtender>

<asp:CalendarExtenderID="CalendarExtender2"runat="server"
TargetControlID="txtDateReported"
PopupButtonID="Image2"
Format="d">
</asp:CalendarExtender>

<ajaxToolkit:MaskedEditExtenderID="MaskedEditExtender1"runat="server
TargetControlID="txtTimeOccured"
MaskType="Time"
Mask="99:99:99"
AutoComplete="true"
MessageValidatorTip="true"
OnFocusCssClass="MaskedEditFocus"
OnInvalidCssClass="MaskedEditError"
AcceptAMPM="True"
InputDirection="RightToLeft"
AcceptNegative="Left"
DisplayMoney="Left"
ErrorTooltipEnabled="True"/>

<ajaxToolkit:MaskedEditExtenderID="MaskedEditExtender2"runat="server"
TargetControlID="txtTimeReported"
MaskType="Time"
Mask="99:99:99"
AutoComplete="true"
MessageValidatorTip="true"
OnFocusCssClass="MaskedEditFocus"
OnInvalidCssClass="MaskedEditError"
AcceptAMPM="True"
InputDirection="RightToLeft"
AcceptNegative="Left"
DisplayMoney="Left"
ErrorTooltipEnabled="True"/>

 

 

Calender Extender inside Modalpopup Delayed display

$
0
0

I have calender extender inside modalpopup works fine in Firefox but in chrome it display after 5 seconds, but its fast when not inside modal popup. I have the latest Ajax, any solution plz....

How to get uploads count in ajax file upload ( multiupload)

$
0
0

The ajax file upload i used from ajax control toolkit is a multiuploader , i want to retrieve the number of files being uploaded . i tried this code here : 

protected void AjaxFileUpload1_UploadComplete(object sender, AjaxControlToolkit.AjaxFileUploadEventArgs e)
        {


            String pathdirectory = (Session["StoryPath"].ToString() + "/"); // selected item.

            EnsureDirectoriesExist(pathdirectory);

            String filepathImage = @"Story/" + pathdirectory;

           HttpFileCollection uploads = HttpContext.Current.Request.Files;
                  

            for (int i = 0; i < uploads.Count ; i++)
            {
                int k = 0;
                int j = 0;

                if (j > 8)
                {
                    j = 0;
                    k += 1;
                }
                string total = k.ToString() + j.ToString();
                AjaxFileUpload1.SaveAs(Server.MapPath(filepathImage + (total+ e.FileName)));
                j++;
            }

Because i want to rename every file which is uploaded like this :  00file.jpg , 01file.jpg , 02file.jpg and so on ... for now , the above code rename every file with 00 infront instead of increment in each file .. i guess i think i need to count the number of files being uploaded and rename them 1 by 1 in a loop but i duno if i am doing this in the correct way ( see  above code ) , i am new to c# and ajax , hope experts here can guide me and provide me some help ! thanks 

MaskEditValidator preventing initial value from being assigned

$
0
0

The MaskedEditValidator is preventing me from assigning an initial value to a textbox.
I'm using the MaskedEditExtender and MaskedEditValidator to enter a time formatted "hh:mm tt".
Without the MaskedValidator I can assign a default value: TextBox1.Text = Now.ToString("hh:mm tt").
With the MaskedValidator, no value is assigned/displayed, and the control displays invalid.

<asp:TextBox ID="TextBox1" runat="server"/>
<asp:MaskedEditExtender ID="TextBox1_MaskedEditExtender" runat="server" TargetControlID="TextBox1" AcceptAMPM="True" MaskType="Time" ClearMaskOnLostFocus="False" Mask="99:99" Century="2000" Enabled="True" OnInvalidCssClass="MyError" ClearTextOnInvalid="True" />
<asp:MaskedEditValidator runat="server" ID="mev1" ControlToValidate="TextBox1" ControlExtender="TextBox1_MaskedEditExtender" ErrorMessage="mev1" />

Protected Sub Button_Click(sender As Object, e As EventArgs) Handles Button.Click
      TextBox1.Text = Now.ToString("hh:mm tt")
End Sub

using updatepanel

$
0
0

hi

i have a textbox in my form.i want to put it in a n updatepanel

what should i write in codebehind?

ajax is throwing error can't identify error.

$
0
0

I have a asp.net app I'm developing in the .net 4.0 framework.  I just started getting an jscript error like: SCRIPT5022: Sys.WebForms.PageRequestManagerParserErrorException

Internet explorer 9 stops working on my DEV box, and AJAX functionality stops working on tab control post back events for IE.  The program works in Firefox fine, and on a different computers using internet explorer 10.

As a potential solution I tried re-install the client framework for 4.0, and it did not resolve the error.  I'm not doing any redirects, and it just now started failing for no reason to me.

It’s a pain and I don't understand why ASP AJAX keeps breaking.  Needless to say the error returned is no help at all and is very ambiguous and does not help resolve the error.

Why is this continuously being an issue when no major changes to the code occurs?  Why does ASP.NET AJAX provide such cruddy feedback and assistance in resolving errors?  How do I resolve this?

From my analysis it sounds like it's possible a postback event for one of my controls is not being registered or does not exist.  How do I find out which control is causing the error.  Why is the error message so generic that it tells you nothing about where the error could be occurring?

 

Thanks


get return value of ajax and put it into a popup div

$
0
0

hi all..i have a problem and that is. 

in a on clientclick event i send some data to a ajax function .and i get the desire data from webmethod.my code is hear.

//onclick event<asp:TemplateField ItemStyle-CssClass="hr" ><ItemTemplate><asp:LinkButton ID="lnktittle" OnClientClick='<%# string.Format("javascript:return showpopup(\"{0}\")", Eval("PostId")) %>' Text='<%# Eval("Tittle") %>' CssClass="post_tittle" runat="server"></asp:LinkButton></ItemTemplate><HeaderStyle HorizontalAlign="Left" /></asp:TemplateField>

my ajax function:

function showpopup(PostId)
                {
                    alert(PostId);$.ajax({
                        type: "POST",
                        url: "viewprojectdetails.aspx/getdatafromgridview",
                        data: '{PostId: "' + PostId + '" }',
                        contentType: "application/json; charset=utf-8",
                        dataType: "json",
                        success: function (r) { 

                        }

                    }); 
               
                }

my web method:

 [WebMethod]
  public static postpagemass getdatafromgridview(string PostId)
  {
      postpagemass objpost = new postpagemass(conection.ConnectionString);
      objpost.GetRowfrompost(Convert.ToInt32(PostId));


      return objpost;
  }

hear i return a single object ..Now i want to show my data into a popup my popup div is.

<div class="postdiv" id="postbackgroundpopup"><div id="postmanuepopup" class="displaypostdetails"><asp:HiddenField ID="hdid" runat="server" /><div class="postpopupdetailsdiv"><div class="displayparentpostleft"><asp:Label ID="lblshowtittle" runat="server" ></asp:Label><br/>
  Posted By <asp:Label ID="lblshowusername" runat="server"></asp:Label> 
 on<asp:Label ID="lblshowpost_date" runat="server"></asp:Label><br/>
 Discussion are hear:-<asp:Label ID="lblbody" runat="server"></asp:Label></div><div class="displayparentpostright"><a href="#" class="editpost">Edit</a><br/><hr/><a href="#" class="editpost">Delete</a></div></div>

i want to sjow my data in this lable and show the popup div...but i dont know how to write the code in javascript...

thanks to replay...




Postback intermittent in google chrome

$
0
0

I have a page that works fine in IE, Firefox and Safari but the postback intermittently will not work in Chrome. Here is information for the page:

Sharepoint 2010

Custom webpart running in a webpart page

URL - http://www.co.st-clair.il.us/Pages/parcel.aspx

using ajax control toolkit

What I'm seeing is the page will intermittently not work. What I'm seeing when using the chrome developer tools is that there are scripts that are not loading on page load. On the chrome developer console I select "Network" and view "Scripts". when the page loads, there should be 26 scripts that load. Intermittently, only 13 will load. When the scripts do not load, the postbacks do not fire at all. there is a submit button and a dropdown that causes a postback, neither one do anything.

Any ideas on why Chrome is not loading all the scripts?

Thanks,

Mark B

ModalPopupExtender vs UpdatePanel

$
0
0

I've got some UpdatePanels in a page, and a draggable ModalPupup too.

 

Then when a control show me the modal and I move it from it's original position, after some seconds the modal go back to its original position, i think it happens because the updatepanels makes postback and then this reset the position of my modal.

 

What Can I do?

 

Please!

 

ConfirmButtonExtender with ModalPopupExtender with Animations Problem

$
0
0

Hello,

I have a page with a Button which is tied to a ConfirmButtonExtender which is in turn tied to a ModalPopupExtender that has animations. I am unable to get the following code to work properly:

<asp:UpdatePanel ID="UpdatePanel1" runat="server"><ContentTemplate><asp:Button ID="cmdDelete" runat="server" Text="Delete" CssClass="cmdButton" CausesValidation="False"/><asp:ConfirmButtonExtender ID="cmdDelete_ConfirmButtonExtender" runat="server"
        TargetControlID="cmdDelete"
        DisplayModalPopupID="cmdDelete_mpe"></asp:ConfirmButtonExtender><asp:ModalPopupExtender ID="cmdDelete_mpe" runat="server" Drag="true"
        PopupControlID="panelDeleteFull" OkControlID="ButtonOkDelete" CancelControlID="ButtonCancelDelete"
        PopupDragHandleControlID="panelDeleteDrag" TargetControlID="cmdDelete"
        BackgroundCssClass="GrayedOut"><Animations><OnShown><FadeIn Duration="0.4" Fps="75" /></OnShown><OnHiding><FadeOut Duration="0.4" Fps="75" /></OnHiding></Animations></asp:ModalPopupExtender><asp:Panel ID="panelDeleteFull" runat="server"><asp:Panel ID="panelDeleteDrag" runat="server" CssClass="modalDeleteHandle"><div style="float:left">Warning ...</div></asp:Panel><div class="modalDeleteContent"><br />
            This action will permanently delete the current record.<br /><br /><div style="text-align:right;" id="panelbuttons"><asp:Button ID="ButtonOkDelete" runat="server" Text="OK" CssClass="panelButton"/>&nbsp;<asp:Button ID="ButtonCancelDelete" runat="server" Text="Cancel" CssClass="panelButton" /></div></div></asp:Panel></ContentTemplate></asp:UpdatePanel>

I get the following error whenever I click the "Ok" button (ButtonOkDelete):
Microsoft JScript runtime error: '_onHiding.get_animation()' is null or not an object (Note: I've tried numerous versions of the toolkit and it doesn't work)

The only way I can get it to work is to remove the UpdatePanel, but I'd really like to be able to keep the UpdatePanel.

Any ideas on how to fix this?

Thank you in advance!

Releg Replace

$
0
0

Hi,

How do I remove the img tags with regex in datalist.

komut.CommandText = "Select * From Table";
            DataList1.DataSource = komut.ExecuteReader();
            DataList1.DataBind();
            komut.Dispose();
            con.Close();

Viewing all 5678 articles
Browse latest View live


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