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

Previous Modal popup shows on button postback.

$
0
0

I have a page with a number of modal popups, some that have content within an update panel.

I show one of these modal popups then close it. If I then click on a different button on the page (not associated with a modal popup window), the previous modal that was open shows itself.

I have got round this by coding mpeMyModal.hide. However this is a workaround. Not sure why it is happening though assume it is to do with partial and full post-backs.

 

Is it s bug?

 

Thanks.


reorderlist not working with 40412/VS2010

$
0
0

using 40412 in VS2010, I can't get reorderlist to work - can't pick any items up and move them around in any browser. sample site works fine, and I even tried referencing the dll from the bin directory there with no luck. tried running some code that binds data manually from a working project that uses a previous release and all I get is a regular list. converted data source to a sqldatasource and still no dice. 

one oddity I do see between my non-working project and the other working examples (sample site and my older project) is that the generated list item div IDs are identical in my project, while the working examples all have unique IDs generated, ie:

non-working project: <li id="ReorderList1" style="vertical-align:middle;"> (all LIs identical)
working example (40412 sample site): ><li id="ctl00_SampleContent_ReorderList1__rli5" style="vertical-align:middle;"> (each line has unique suffix - in this case __rli5)

thanks for the help

problems deploying aspnet with ajaxcontroltoolkit

$
0
0

hello

I am finishing my asp.net web application and I am using some controls from ajaxcontroltoolkit, I just did the publication proccess over my production server and I got problems with some pages using ajaxControlToolKit controls

On one page I got two ModalPopupExtender only one works in the server
In the ModalPopupExtender that works I have one textEditor, it shows all the toolbars but it doesnt show the space for writting the text!!! so there is an editor without space for typing!!

On my dvelopment PC everything its allright, ( win7 pro , vs2012, .net 4.0) on the server (WinServer 8 r2 standart sp1) doesnt work!!!

Do I have to install something on the server?????

thnks in advance


 

Asp.net Message Box

$
0
0
I get the following error when I use this with AJAX. Is there a way around this problem? 
Sys.Webforms.PagerequestManagerParserErrorException Any help is appreciated!!

datalist inside Accordion

$
0
0

Hi all,

I am displaying a list of data as grouped list using accordion control.

The data gets binded and it displays the expected result.

My issue is when I click on the header, the datalist gets displayed but the scroller moves to some other position like If

I click on the second header, the second datalist gets expanded but it shows somewhere in the middle of the datalist

instead of showing the second header and the starting items of datalist...

Please let me know where I am going wrong?

HOw to convert dd-mm-yyyy format to dd-MMM-yyyy in maskedTextBox

$
0
0

Text Box Code :

<asp:textbox id="txtwefDate" runat="server" __designer:wfdid="w37"  cssclass="txt10" width="88px" TabIndex="4"   ></asp:textbox>

MaskEditExtender Code :

 <ajaxToolkit:MaskedEditExtender runat="server"
                                 TargetControlID="txtwefDate"
                                      Mask="99/LLL/9999"
                                      CultureName="en-GB"
                                      MessageValidatorTip="true"
                                      MaskType="Date"
                                      InputDirection="RightToLeft"
                                      UserDateFormat="DayMonthYear"
                                     ErrorTooltipEnabled="True"/>

CalenderExtender Code :

 <ajaxToolkit:Calendarextender runat="server"
                                          TargetControlID="txtwefDate"
                                          Format="dd/MMM/yyyy"
                                          PopupButtonID="Image1" />

Web.Config Code :

<globalization requestEncoding="utf-8" responseEncoding="utf-8" culture="en-GB" uiCulture="en-GB"  />
          

Result : dd/NaN/yyyy in textboxt , i want 21/May/2012 or 31/jan/2013

ajax and modal popup extender

$
0
0

hi to all

I have a scanerio thai need to be resolved ..

I have grid and it shows certain record on searching ..and have few columsn like transactionID .Stauts etc etc ..also it have
ModalPopupExtender under the panel (asp panel )

when i click on status column ..it should show modalopopup that show two things ..ErrorCode ,,ErroDescription based in transactionID

now let me show certain code (Existing code ) ..can any one complete my code existing one or help me out to get the desired solution ...

<asp:GridView ID="GV_Main" runat="server" SkinID="GVundefinewidht" Width="100%"
            onpageindexchanging="GV_Main_PageIndexChanging"
            onrowdatabound="GV_Main_RowDataBound" onrowdeleting="GV_Main_RowDeleting"
            onrowediting="GV_Main_RowEditing" onsorting="GV_Main_Sorting"
              AllowSorting="true"    AutoGenerateColumns="False"
        ShowHeader="true" onrowcreated="GV_Main_RowCreated" ><RowStyle HorizontalAlign="center" /><Columns ><asp:TemplateField HeaderText="Status"    ShowHeader="False"><HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"/><ItemStyle HorizontalAlign="Center" /><ItemTemplate ><asp:ImageButton ID="lbl_Status" Visible="true"   runat="server"
                                                CommandName ='<%# Eval("ACTION_NAME") %>'   OnCommand="Showstatus"
                                                CommandArgument='<%# Eval("P_TRANSACTIONID") %>'
                                                ImageUrl="~/images/status1.gif"  CausesValidation ="false" /><asp:Panel ID="pnlPerson" runat="server" Style="display: none" Width="400px" Height="200px"
                                BackColor="White" BackImageUrl="~/images/loginbox1.jpg"><div style="float: right; margin-right:10px; margin-top:7px;"><asp:LinkButton ID="lnkClose" runat="server" Font-Bold="true" ForeColor="White" Font-Size="12px">Close</asp:LinkButton></div><table width="100%"><tr><td style="height:30px; width:20px;"></td><td></td> <td></td></tr><tr> <td></td><td align="left"><asp:Label ID="lblBank" runat="server" Text="Error Code:"></asp:Label></td><td align="left"><asp:Label ID="Label1" runat="server" Text="Error Code:"></asp:Label></td></tr></table></asp:Panel><cc1:ModalPopupExtender ID="extPerson" runat="server" TargetControlID="lbl_Status"
                                PopupControlID="pnlPerson" DropShadow="true" CancelControlID="lnkClose"  /></ItemTemplate></asp:TemplateField><asp:TemplateField HeaderText="Transaction ID"
SortExpression="P_TRANSACTIONID" ShowHeader="True"><HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" /><ItemStyle HorizontalAlign="Right" /><ItemTemplate><asp:Label ID="lbl_P_TRANSACTIONID" runat="server"
Text='<%# Eval("P_TRANSACTIONID") %>' Width ="100px"
CausesValidation ="false" /></ItemTemplate></asp:TemplateField></Columns> </asp:GridView>



Accordion Pane i have used as my menu for navigating pages .

$
0
0

HI all,

  I have used accordion as my menu in my asp.net web application. but i have created it dynamically by coding . below is the code :-

//Binding the Accordion menu for each and every user according to the authorizations
SqlConnection conMenu = new SqlConnection();
conMenu.ConnectionString = clsProperty.GetConnectionString;
conMenu.Open();
SqlDataAdapter daMenu = new SqlDataAdapter("SELECT DISTINCT UserPermissionDetails.PageGroupId, PageGroupDetails.PageGroupName FROM UserPermissionDetails INNER JOIN " +
"UserGroupDetails ON UserPermissionDetails.UserGroupId = UserGroupDetails.UserGroupId INNER JOIN EmployeeDetails ON UserGroupDetails.UserGroupId = EmployeeDetails.UserGroup INNER JOIN " +
"PageGroupDetails ON UserPermissionDetails.PageGroupId = PageGroupDetails.PageGroupDetailsId WHERE (EmployeeDetails.EmpId =" + Session["EmpId"].ToString() + ") AND (UserPermissionDetails.ViewPage = 1)", conMenu);
DataTable dtMenu = new DataTable();
daMenu.Fill(dtMenu);
if (dtMenu.Rows.Count > 0)
{
AjaxControlToolkit.AccordionPane objPane;
foreach (DataRow row in dtMenu.Rows)
{
objPane = new AjaxControlToolkit.AccordionPane();
objPane.ID = row[0].ToString();
Label lblHeaderTitle = new Label();
lblHeaderTitle.Text = row[1].ToString();
objPane.HeaderContainer.Controls.Add(lblHeaderTitle);
SqlConnection conSubMenu = new SqlConnection();
conSubMenu.ConnectionString = clsProperty.GetConnectionString;
conSubMenu.Open();
//SqlDataAdapter daSubMenu = new SqlDataAdapter("SELECT Name, PageName, PagePath FROM PageDetails WHERE (PageGroup =" + row[0].ToString() + ")", conSubMenu);
SqlDataAdapter daSubMenu = new SqlDataAdapter("SELECT PageDetails.Name, PageDetails.PageName, PageDetails.PagePath FROM PageDetails INNER JOIN UserPermissionDetails ON PageDetails.PageGroup = UserPermissionDetails.PageGroupId AND PageDetails.PageId = UserPermissionDetails.PageId INNER JOIN UserGroupDetails ON UserPermissionDetails.UserGroupId = UserGroupDetails.UserGroupId INNER JOIN EmployeeDetails ON UserGroupDetails.UserGroupId = EmployeeDetails.UserGroup WHERE (UserPermissionDetails.PageGroupId =" + row[0].ToString() + ") AND (UserPermissionDetails.ViewPage = 1) AND (EmployeeDetails.EmpId =" + Session["EmpId"].ToString() + ")", conSubMenu);
DataTable dtSubMenu = new DataTable();
daSubMenu.Fill(dtSubMenu);
if (dtSubMenu.Rows.Count > 0)
{
int j = 0;
HyperLink link;
foreach (DataRow rowSubMenu in dtSubMenu.Rows)
{
if (j == 0)
{
link = new HyperLink();
link.ID = rowSubMenu[1].ToString();
link.Text = rowSubMenu[0].ToString();
link.NavigateUrl = rowSubMenu[2].ToString();
objPane.ContentContainer.Controls.Add(link);
j++;
}
else
{
objPane.ContentContainer.Controls.Add(new LiteralControl("<br/>"));
link = new HyperLink();
link.ID = rowSubMenu[1].ToString();
link.Text = rowSubMenu[0].ToString();
link.NavigateUrl = rowSubMenu[2].ToString();
objPane.ContentContainer.Controls.Add(link);
}
}
}
dtSubMenu.Dispose();
daSubMenu.Dispose();
conSubMenu.Close();

Accordion1.Panes.Add(objPane);
}
}
dtMenu.Dispose();
daMenu.Dispose();
conMenu.Close();

. This part is working very well ... it look like the sam in the belo picture :-

menu

but if i am selecting "Center Wise" option under "Report" the page is getting navigated but the menu "report" get closed and shows "Asset" menu open every time. i want to keep it stuck for its child options navigated. how can i do it. plz help.....


web service method with parameter is not calling with auto complete text box extender

$
0
0

Hi to all ..thanks uin advance

web service method(getMainHeads) with parameter is not calling with auto complete text box extender(same method with out parameter is calling fine) .Please tell me solution..

My Service is

[System.Web.Script.Services.

ScriptService]

 

publicclassInvService : System.Web.Services.WebService
 

{ 

ItemMainHeadMsts objItemMainHeadMsts;

 DatabaseHelper objDataHelper;

[WebMethod]

 publicstring[] GetMainHeads(string value)

{ 

 

List<string> oList = newList<string

>();

objItemMainHeadMsts =

newItemMainHeadMsts

();

objDataHelper =

newDatabaseHelper

();

objItemMainHeadMsts =

ItemMainHeadMstBase.SelectByFieldAuto("IMHDesc"

, value);

 

foreach (ItemMainHeadMst mainHead in

objItemMainHeadMsts)

{

oList.Add(mainHead.IMHDesc);

}

 

return

oList.ToArray();

 

//return objItemMainHeadMsts;

}

}

<asp:ScriptManagerID="scrManager"runat

="server">

 </asp:ScriptManager

>

 

<asp:UpdatePanelID="up1"runat

="server">

 <ContentTemplate

>

 <aspAjax:AutoCompleteExtenderID="AutoCompleteExtender1"runat="server"MinimumPrefixLength

="2"

 ServiceMethod="GetMainHeads"ServicePath

="InvService.asmx"

 

TargetControlID="txtauto"EnableCaching="true"

/>

 

<asp:TextBoxID="txtauto"runat="server"

/>

 

</ContentTemplate

>

 </asp:UpdatePanel

>

 

  

 

 

 

how can I set htmleditorextender to readonly?

$
0
0

I have a textbox "txtMessage" extended by a htmleditorextender.

In a workflow, the textbox has to be readonly at a certain state.

txtMessage.Readonly = true or txtMessage.enabled = false has no effect.

htmlEdtitorExtender.enabled = false simply deactivates the extender.

If I disable the extender and set the textbox to reaonly, the textbox is reaonly but I'm loosing the formatting and that's not a real alternative anyway. Is there a simple trick (preferred from code behind) to set the corresponding textarea readonly?

How to control alternativing color via CSS in AccordianPane?

$
0
0

I'm using an Accordion control. For each item inside of a pane, I like to have alternating background. How do I control this background color via CSS? Below is my pane code.

<asp:AccordionPane ID="adp2000s" runat="server"><Header>
                            2000s</Header><Content><asp:SqlDataSource ID="sql2000s" runat="server"
                                ConnectionString="<%$ ConnectionStrings:ConnStr %>"
                                SelectCommand="SELECT [clsNoteID], [fstName], [lstName], [mdnName], [classOf1], [classOf2], [major1], [major2], [notes], [dateInsert] FROM [classNotes] WHERE (([approval] = @approval) AND ([archived] = @archived) AND ([cateID] = @cateID) AND ([classOf1] &gt;= @classOf1) AND ([classOf1] &lt; @classOf12)) ORDER BY [classOf1], [classOf2], [lstName]"><SelectParameters><asp:Parameter DefaultValue="True" Name="approval" Type="Boolean" /><asp:Parameter DefaultValue="False" Name="archived" Type="Boolean" /><asp:Parameter DefaultValue="1" Name="cateID" Type="Int32" /><asp:Parameter DefaultValue="2000" Name="classOf1" Type="Int32" /><asp:Parameter DefaultValue="2010" Name="classOf12" Type="Int32" /></SelectParameters></asp:SqlDataSource><asp:Accordion
                                ID="acd2000s"
                                runat="Server"
                                SelectedIndex="0"
                                HeaderCssClass="accordionHeader"
                                ContentCssClass="accordionContent"
                                AutoSize="None"
                                FadeTransitions="true"
                                TransitionDuration="250"
                                FramesPerSecond="40"
                                DataSourceID="sql2000s"><Panes></Panes><HeaderTemplate><asp:Label ID="lblFullName" runat="server" Text='<%# getName() %>' /></HeaderTemplate><ContentTemplate><asp:Label ID="lblClassNews" runat="server" Text='<%# getClassNews() %>' /></ContentTemplate></asp:Accordion></Content></asp:AccordionPane>



ModalPopUp not poping up

$
0
0

Hi

i have setup a simple modal pop.

i manage to find exacly the problem:

if i use this tag at the beginning of the page

<!DOCTYPE html>

witch is the asp web form default, modal popup works ok.

if i use this tag

<!DOCTYPEHTMLPUBLIC"-//W3C//DTD HTML 4.0 Transitional//EN">

popupextender will not popup, it shows as part of the page, but with all functionalities working including hiding and showing.

any ideia how i can keep the second tag and still have the modalpopup extender behave like expected?

 

thks

rgds

rui

Add numericupdown extender in code

$
0
0

I have implemented this extender in the .aspx page as a test and it is working fine.

However, I am actually adding controls dynamically in the .cs file and would like to add this to a text box. Please can you show how to do this and any libraries I need to include.

AutoCompleteExtender - Cannot deserialize. The data does not correspond to a valid JSON.

$
0
0

I am using the AutoCompleteExtender in the latest AjaxControlToolKit from Nuget in a ASP.NET 4.5 web form project.

It is a very basic demo app just to show the control.  Everything works fine, but running in Visual Studio 2012 the Debug output keeps sayingJavascript runtime error: Sys.ArgumentException: Cannot deserialize.  The data does not correspond to valid JSON.everytime the web method is called.

As I said, the auto complete is working fine and names are showing.  A Fiddler trace would show something like{"prefixText":"ma","count":20} on the POST data and a result like:

{"d":["kingkong@gmail.com","ronnie@email.com",maggie@whitehall.gov.uk]}

At the moment this exception is just an irritation but is it a sign of something more serious?

Thanks.

 

Ajax Nested Tab Container does not display in IE

$
0
0

I have the below nested tab container. The Root tab container does not display in IE but display in Chrome. 

<form id="form1" runat="server"><cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></cc1:ToolkitScriptManager><cc1:TabContainer ID="RootTabContainer" runat="server" ActiveTabIndex="0" Width="100%" Visible="true"
            Height="100%"><cc1:TabPanel runat="server" HeaderText="Preventative Safety" ID="TP_Safety"><ContentTemplate><cc1:TabContainer ID="NestedTabContainer1" runat="server" ActiveTabIndex="0" Width="100%"
                        Height="100%"><cc1:TabPanel ID="TP_Training" HeaderText="Training" runat="server"><HeaderTemplate>
                                Training</HeaderTemplate><ContentTemplate></ContentTemplate></cc1:TabPanel><cc1:TabPanel ID="TP_SafetyInspections" HeaderText="Safety Inspections" runat="server"><ContentTemplate></ContentTemplate></cc1:TabPanel></cc1:TabContainer></ContentTemplate></cc1:TabPanel><cc1:TabPanel ID="TP_Reports" HeaderText="Reports" runat="server"><ContentTemplate><asp:Panel ID="Panel6" runat="server" BackColor="#1D4482" Height="100%"><div class="style3">
                            Reports</div></asp:Panel></ContentTemplate></cc1:TabPanel><cc1:TabPanel ID="TB_Config" HeaderText="Configuration" runat="server"><ContentTemplate><asp:Panel ID="Panel1" runat="server" BackColor="#1D4482" Height="100%"><div class="style3">
                            Configuration</div></asp:Panel><br /><cc1:TabContainer ID="NestedTabContainer2" runat="server"><cc1:TabPanel ID="TabPanel12" HeaderText="Trainingggg" runat="server"><ContentTemplate></ContentTemplate></cc1:TabPanel></cc1:TabContainer></ContentTemplate></cc1:TabPanel></cc1:TabContainer></form>


Ajax functionality changed with newer jquery versions - cannot figure out what has changed!

$
0
0

I am working to modify a code sample called "WebMatrix and jQuery Form" from Mikesdotnetting. That code sample is based on jQuery 1.4.2. Current jQuery is on version 1.9.1

The problem lies in the section function(response), where the dialog does close, but it does not load EnterBarn nor does it highlight the first row in the grid.

From http://api.jquery.com/jQuery.ajax/ I have found that functionality of success has change since 1.4.*, but I have no clue if this is responsible for the code not functioning.

buttons: {
                    'Add Barn' : function(){
                        $.ajax({
                            type: "POST",
                            url: $("#add-barn-form").attr('action'),
                            data: $("#add-barn-form").serialize(),
                            dataType: "text/plain",
                            success: function(response) {
                                $('#dialog-form').dialog('close');
                                $("#grid").load('/EnterBarn/ #grid', function(){
                                    $('tbody > tr:first')
                                    .effect("highlight", {}, 2000);
                                });
                            },

Another possibility is $("#grid").load('/EnterBarn/ #grid', function(){ , but I see nothing mentioned of changes since 1.4.X

http://api.jquery.com/load/

Anyone?

TIA

Robert

how to fix popup position to center of screen

$
0
0

I am using popupcontrolextender but position of popup doesnt get fix at center of screen,it keeps changing with changing resolution.

how to fix position at center of screen, so that resolution of computer doesnt  affect it .

I had set its property position="center" but it doesnt work.I am using vb.net.

thank you

Regards

how can i prevent file from upload if it is exits (ajax file upload )

$
0
0

dear all

i have use ajax file upload and i want it not upload file if it exits

i try this in my code but i dont see any thing in lblmsg.text ? i want to prevent the upload and alert the client for that so pleasr how can i do that ?

var full_path = Server.MapPath((String.Format("~/Images/pt_img/{0}/{1}", Session["pt_id"], Path.GetFileName(e.FileName))));
            if (!File.Exists(full_path))
                {
                    AjaxFileUpload1.SaveAs(full_path);

                    var cn = new SqlConnection(cs);
                    var cm = new SqlCommand("add_pt_img", cn) { CommandType = CommandType.StoredProcedure };
                    cm.Parameters.Add("@pt_id", SqlDbType.Int).Value = Session["pt_id"].ToString();

                    // Save Image Name Only
                    cm.Parameters.Add("@img_name", SqlDbType.NVarChar, 150).Value = Path.GetFileName(e.FileName);

                    cn.Open();
                    cm.ExecuteScalar();
                    lblMsg.ForeColor = System.Drawing.Color.Yellow;
                    lblMsg.Text = "Patient Image Saved Successfully";
                    cn.Close();
                }
                else
                {
                    lblMsg.Text = "File exists!!!";
                    return;
                }



AjaxControlToolkit.Properties.Resources.resources

$
0
0

Hi,

Please suggest me how to fix following error permanently,

"Could not find any resources appropriate for the specified culture or the neutral culture.  Make sure "AjaxControlToolkit.Properties.Resources.resources" was correctly embedded or linked into assembly "AjaxControlToolkit" at compile time, or that all the satellite assemblies required are loadable and fully signed."

I know that I need to add appropriate extensions in web.config file for using ajaxtoolkit, I have added however it is not working,

Every time when I build code I need to add this .dll references manually.

How to disable past date in ajax control toolkit calendar extender

$
0
0

Goodmoring,

I have two textboxwithcalendar extenderinajax.
I would likeonce you select thefirst datefrom the first textboxinsecond textboxthere are onlythedate >of the first textbox.

How can I do??


First Textbox with calendar

<asp:TextBox  ID="tb_dal" runat="server" style="margin-left: 3px"></asp:TextBox>&nbsp;</td>
           
<asp:CalendarExtender ID="CalendarExtender1" TargetControlID="tb_dal" runat="server"
                Format="dd.MM.yyyy" FirstDayOfWeek="Monday" DaysModeTitleFormat="dd.MM.yyyy"
                TodaysDateFormat="dd.MM.yyyy"  > </asp:CalendarExtender>



second Textbox with calendar

<asp:TextBox ID="tb_al" runat="server" Width="125px"></asp:TextBox></td>

        <asp:CalendarExtender ID="CalendarExtender2" TargetControlID="tb_al" runat="server"
                Format="dd.MM.yyyy" FirstDayOfWeek="Monday" DaysModeTitleFormat="dd.MM.yyyy"
                TodaysDateFormat="dd.MM.yyyy" > </asp:CalendarExtender>

Viewing all 5678 articles
Browse latest View live


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