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

How to create label text using html helper from Model in ASP.Net MVC 5 (Razor View)

$
0
0

I am trying to create a label text using html helper from my model RoomAvailabilitySummary

View Design:

@model IEnumerable<WBE.Model.RoomAvailabilitySummary>

@using(Ajax.BeginForm("RoomsAvail", new AjaxOptions
                                       {
                                        UpdateTargetId = "RoomsAvailData",
                                        InsertionMode = InsertionMode.Replace
                                       }))
{
 @Html.AntiForgeryToken()<div class="container paddingzero"><div class="row rowbackground">
        @Html.DisplayFor(model => model.ARRDAT)</div><div class="row rowbackground">
        @Html.EditorFor(model => model.ARRDAT)</div><div class="row rowbackground">
        @Html.DisplayFor(model => model.DEPDAT)</div><div class="row rowbackground">
        @Html.EditorFor(model => model.DEPDAT)</div></div>
}<div class="tab-content" id="RoomsAvailData">
    @Html.Partial("_AvailableRoomsandPackages", Model);</div>

Controller:

public class RoomAvailabilitySummary
{
    [Key]
    public int CUSTCODE { get; set; }
    [Display(Name = "Checkin")]
    public string ARRDAT { get; set; }
    [Display(Name = "Check out")]
    public string DEPDAT { get; set; }
}

Problem: I am unable to create label text using my model with html helper.

Error i am getting: IEnumerable' does not contain a definition for 'ARRDAT' and no extension method 'ARRDAT' accepting a first argument of type IEnumerable

What i have done the mistake in my code?


Ajax autocomplete extender is not working in IIS 7

$
0
0

   I am Using Ajax autocomplete extender using web service to load details in textbox.

It is working in development PC. But When i deployed application in UAT server not working in IIS 7 Window server 2008 R2.

I check the tracer using fiddler, Getting 401 Unauthorized error. But I check the Permissions in IIS all vailable.

I am using VS 2010 and .net Frame work 4.0 and Ajax control 4.0

Any suggestions. 

gridview is not a know element

$
0
0

im kinda new in asp.net and im trying to wrap a gridview with an ajax update panel but as soon as i wrap it, it shows me the following warning!!now my web.config is not missing actually! what is causing this and how can i fix it?

Warning 1 Element 'GridView' is not a known element. This can occur if there is a compilation error in the Web site, or the web.config file is missing. ......\TimeSheetViewer.aspx 38 18 Entity framework using Code First

ModalPopupExtender and ajax combobox

$
0
0

i have a ModalPopupExtender which opens a grid.then i have main grid which is in the update panel.inside this grid there is a ajax combobox.when i enter on the combobox the ModalPopupExtender is opened unwilingly.any help

output of function

$
0
0

hi,i have a faunction like this:

[WebMethod]
        public bool setstatus(int bid)
        {
            Models.mBlockTextContext ctx = new mBlockTextContext();
            var bselect = (from b in ctx.mBlocksLists
                           where b.BlockID == bid
                           select b).FirstOrDefault();

            if (bselect != null)
            {
                bselect.BlockStatus = !bselect.BlockStatus;
                ctx.SaveChanges();
                return bselect.BlockStatus;
            }
            return false;
        }

this is in my webservice
i have a button,i want to write the code,that when button is clicked,some string will be printed on page with ajax

how can i do?

 

Autocomplete Extender issues.

$
0
0

Hello all ,

i am new to this forum and also a beginner in ASP.NET.I searched the forum for posiible answers or hints about my issue but was unable to do so.

I am basically in my form trying to check a customer against the database and return or precisely autofill the relevant results in the relevant textboxes such as the customer address , cell no and email.

my autoextender works fine checking against the database but i am unable to make it work to reflect the same in the textboxes if at all they do exist or else leave the textboxes for the user to fill up.

The code for the same is given below :

><asp:TextBox ID="customer_name_tb" runat="server" OnTextChanged="customer_name_tb_TextChanged" Width="400px" AutoPostBack="True"></asp:TextBox><ajaxToolkit:AutoCompleteExtender ServiceMethod="Search_database" OnClientPopulated="dd" OnClientItemSelected="itemSelected"
                                MinimumPrefixLength="2" BehaviorID="AutoCompleteEx"
                                CompletionInterval="100" EnableCaching="false" CompletionSetCount="10"     
                                TargetControlID="customer_name_tb"
                                ID="AutoCompleteExtender1" runat="server" FirstRowSelected="false" UseContextKey="True"></ajaxToolkit:AutoCompleteExtender><asp:HiddenField ID="hfCustomerId" runat="server" /><asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="customer_name_tb" ErrorMessage="Customer Name is Required" ForeColor="Red" SetFocusOnError="True" Display="Dynamic"></asp:RequiredFieldValidator><asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="customer_name_tb" ErrorMessage="Incorrect Name." ForeColor="Red" ValidationExpression="^[a-z A-Z 0-9]*$" Display="Dynamic"></asp:RegularExpressionValidator>

<script type="text/javascript">

        function itemSelected(sender,ev) 
        {
            var index = $find("AutoCompleteEx")._selectIndex;
            var value = $find("AutoCompleteEx").get_completionList().childNodes[index]._value;$find("AutoCompleteEx").get_element().value = value;$get("<%=hfCustomerId%>").value = ev.get_value();

        }

        
        function dd() {

            var comletionList = $find("AutoCompleteEx").get_completionList();

            for (i = 0; i < comletionList.childNodes.length; i++)

            {

                var itemobj = new Object();

                var _data = comletionList.childNodes[i]._value;

                itemobj.name = _data.substring(_data.lastIndexOf('|') + 1); // parse name as item value

                comletionList.childNodes[i]._value = itemobj.name;

                _data = _data.substring(0, _data.lastIndexOf('|'));

                itemobj.age = _data.substring(_data.lastIndexOf('|') + 1);

                comletionList.childNodes[i].innerHTML = "<div style='float:right'>" + itemobj.name + "</div>" + "<div style='float:left'>" + itemobj.age + "</div><br/>";

            }

         }
    </script>

 [System.Web.Script.Services.ScriptMethod()]
        [System.Web.Services.WebMethod]
        public static List<string> Search_database(string prefixText, int count)
        {
            using (SqlConnection conn = new SqlConnection())
            {
                conn.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings["RegConnectionString"].ConnectionString;
                using (SqlCommand cmd = new SqlCommand())
                {
                    cmd.CommandText = "select Customer_id,Customer_name,Customer_address from Customer where Customer_name like + @SearchText + '%'";
                    cmd.Parameters.AddWithValue("@SearchText", prefixText);
                    cmd.Connection = conn;
                    conn.Open();
                    List<string> customers = new List<string>();
                    using (SqlDataReader sdr = cmd.ExecuteReader())
                    {
                        while (sdr.Read())
                        {
                            customers.Add(sdr["Customer_id"].ToString() + "|" + sdr["Customer_name"].ToString() + "|" + sdr["Customer_address"].ToString());

                        }
                    }
                    conn.Close();
                    
                    return customers;

                }
            }
        }

 protected void customer_name_tb_TextChanged(object sender, EventArgs e)
        {
            string customerId = hfCustomerId.Value.ToString();
            SqlCommand cmd = new SqlCommand();
            cmd.Connection = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["RegConnectionString"].ConnectionString);
            cmd.Connection.Open();

            cmd.CommandText = "select customer_address,customer_cell,customer_email from medico.dbo.Customer where customer_id='" + hfCustomerId + "'";

            SqlDataReader dr = cmd.ExecuteReader();

            if(dr.HasRows)
            {

                while(dr.Read())
                {
                    customer_address_tb.Text = dr["customer_address"].ToString();
                    customer_cell_no_tb.Text = dr["customer_cell"].ToString();
                    customer_email_tb.Text  =   dr["customer_email"].ToString();
                }
            }

        }

Please help.

Also it would be great if you could help with how i could check in the same function if the customer exists and that i need the customer to insert into the database ( if its a new customer ) beacuse i am doing this on the button_click of the form and thus its somewhat complicated.

i want to keep it clean and remove my inefficiency.

Thank You.

 

masked textbox "1-9999999"

$
0
0

I am trying to implement a mask on a textbox that forces the user to follow the format "1-9999999", where the "1-" will always be at the beginning, and they can only enter 7 numbers after that.  I added the masked edit extender, along with the script manager, and put the mask "1-9999999", but it isn't recognizing it at all.  Do master pages affect using the ajax control toolkit? thanks

Slide Show Ajax

$
0
0

I get the below error when I try  to add  SlideShowAnimationType="SlideRight" to the Tag I get this from the http://www.asp.net/AjaxLibrary/AjaxControlToolkitSampleSite/SlideShow/SlideShow.aspx

Type 'AjaxControlToolkit.SlideShowExtender' does not have a public property named 'SlideShowAnimationType'.

here is my code any idea why is this !!

<asp:SlideShowExtender ID="SlideShowExtender1" runat="server"
AutoPlay="true" 
Loop="true" 
SlideShowServiceMethod="GetSlides"
TargetControlID="Image1" ClientIDMode="AutoID" Enabled="True" 
PlayInterval="900" UseContextKey="True" SlideShowAnimationType="SlideRight" ></asp:SlideShowExtender>


Animation Extender

$
0
0

I can't disable the target control button. I use this attribute <EnableAction Enabled="false"/> 

Here is the link example that I used.  http://www.asp.net/AjaxLibrary/AjaxControlToolkitSampleSite/Animation/Animation.aspx

<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">  </asp:ToolkitScriptManager>  <asp:AnimationExtender ID="AnimationExtender1" TargetControlID="lnkYellowFade" runat="server">  <Animations> <OnClick><Sequence AnimationTarget="Message"> <EnableAction Enabled="false"/> <OpacityAction  Duration=".0001" Opacity="1" /><Parallel  Duration=".1"><Move Horizontal="200"   /><Resize  Height="250" Width="250" /></Parallel></Sequence> </OnClick><OnHoverOut><Sequence AnimationTarget="Message">  <Resize  Height="5" Width="5" Duration=".1"/><Parallel  Duration=".0001"><OpacityAction  Opacity="0" /><Move Horizontal="-200"/></Parallel></Sequence> </OnHoverOut></Animations>  </asp:AnimationExtender>  


n.aspx

Client side memory leak

$
0
0

Hi,

I have currently the problem that a lot of my users have problems with the memory usage of their IE when they use my application. After a lot of samples and some research on google I didn't find a solution for my problem.

I hope anyone of you can help me.

About the application: *Grid = DataGrid
I just have a simple grid with a lot of columns and few rows (about 50). The grid is within a updatepanel and that causes the problems I guess. Currently I have a sample which shows the problem really well. Of course it is not a really useful sample but it helps to reproduce the problem.
It can be downloaded from my onedrive: https://onedrive.live.com/redir?resid=42A470EDA779AD47%21111
Just page the grid about 10 times and you will see that the memory increases. In the sample project its about 80%-100% on IE11 Win8.1. Many of my users have IE9 where it is much worse (feedback of the users).

Hopefully anyone knows what I'm doing wrong. Btw. using less columns or less data is at the moment no solution.

Greets,
Jochen

Tab Panel Flicker Issue Data Load Time

$
0
0

I have use one Tab Control Panel 

But issue is got one tab to another tab a time panel load display two times  

i have use tabcontainer in Iframe so page is very slow 

Show nested gridview by default.

$
0
0

Hello. I have a nested gridview in my application.

How can I set the 2nd gridview shown by default. (without setting Style="display:none"

Access is denied, AjaxControlToolkit

$
0
0

Hi,

I am having an acces deny error when I try to run my web application.

Could not load file or assembly 'AjaxControlToolkit, Version=1.0.20229.20821, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' or one of its dependencies. Access is denied.

I check permissions on the folder and added the AjaxControlToolkit again. 

I tried with in VS2013 and VS2012.

Autocomplete Textbox Using Database Return Value in ASP.NET

$
0
0

Hi,

I use autocompleteExtender to key into a textbox, the value will come from a database table.setting UseContextKey=true,and the ContextKey depend on dropdown control.

When I click the dropdown first,the value come from a database table is what I need.In the meanwhile,I found the dropdown value is wrong,I select another dropdown value,and enter same keyword into the  textboxand,but the value come from a database still show the privious value,not the correct value what I click the dropdown again.

For example,firstly,if the dropdown value is A,I enter keyword test into the textbox,the value what come from a database table is A1,but in the same time,I found the dropdown value should be B,I change the dropdown value is B,and I enter keyword test into the textbox again,the value what come from a database table still is A1,not show the correct value B1.

So,how to fix the code?Thanks.

getting the htmlEditorExtender to work

$
0
0

I have a Visual Basic project that has some ajax controls in the toolbox, but it didn't have the htmleditorcontrol, which I wanted to use.  

I did have the ajaxcontroltoolkit dll in my bin folder.  So I right clicked on the toobox, and I selected 'choose items", then I browsed to my bin folder and selected that dll.  As I hoped, a whole of set of new controls, including the one I wanted, got added.

So I went to my webform, where I have a textbox that I wanted to convert to an html editor.  There was an arrow on my textbox, I clicked on that, and I selected "add extender".  I chose the htmleditorextender, and at first sight, it seemed to work. 

It produced the following html:

<asp:TextBox ID="TextBoxContents" runat="server" Height="500px" style="margin-left: 0px" 
           TextMode="MultiLine" Width="900px" ClientIDMode="Static"></asp:TextBox><asp:HtmlEditorExtender ID="TextBoxContents_HtmlEditorExtender" runat="server" Enabled="True" TargetControlID="TextBoxContents"></asp:HtmlEditorExtender>

I also set

EnableSanitization="false"

and put a scriptmanager in the form above it.

I find that the HtmlEditorExtension simply has no effect at all on the production server - the textbox still looks like a textbox, and in my local pc, it gives errors about the UI.

Any help is appreciated.

Thanks.


AjaxFileUpload corrupt files if the file name contains Arabic text !

$
0
0

After uploading so many files using AjaxFileUpload , I noticed all files uploaded to the server are corrupted.  The error message I get is "Excel can not open the file عربي.xlsx because the fileformat or the file extention is not valid".

If I change the file name from (عربي.xlsx) to (arabic.xlsx) and reupload the file then the file works!

more strange than that is when I tried to upload empty text file with arabic name and when I opened the file , the file opened correctly , but I found letter "n" in the content of the file which I didn't add in the first place !

Can someone explain how I can resolve this issue ? Thank you

PageMethodes is not always called after upgraded to IE9

$
0
0

HI all,

The app works fine in IE8. When upgraded to IE9, the problem is appears. The code is not changed.

In the javascript there is a function which calls a server side subroutine with parameter. The problem is: Sometime the subroutine is performed, somethime not, even the parameter/data is the same.

What I have doen is:

-Add the site as a trusted side in Internet Options/Security

-Add this in the header of the aspx file.: <meta http-equiv="X-UA-Compatible" content="IE=8" />

but it doesn't work, same problem: sometime works, sometime not.

Here is the javascript in aspx file:

function IsOK()
{
//alert("in isOK.")

   var erro = '';
   var MasterID = document.getElementById('<%= hid_masterID.ClientID %>').value;
   var IID = document.getElementById('<%= hid_ID.ClientID %>').value;
   var PostID = document.getElementById('<%= ddlGemeente.ClientID %>').value;
   var FunctieID = document.getElementById('<%= ddlFunction.ClientID %>').value;
   var StatusID = document.getElementById('<%= ddlNewStatus.ClientID %>').value;
   var ResultaatID = document.getElementById('<%= ddlResultaat.ClientID %>').value;
   //alert("now goes to server side.")
   PageMethods.saveData(MasterID, IID, PostID, FunctieID, StatusID, ResultaatID);
}


In aspx I have ScriptManager like this:

<asp:ToolkitScriptManager ID="tsmanager" runat="server" ScriptMode="Release" EnablePageMethods="True"></asp:ToolkitScriptManager>

In the server side (aspx.vb):

<System.Web.Services.WebMethod()> _
Public Shared Sub saveData(ByVal MasterID As Integer, ByVal IID As Integer, ByVal PostID As Integer, ByVal FunctieID As Integer, ByVal StatusID As Integer, ByVal ResultaatID As Integer)
   Dim cn As New SqlConnection
   Dim cmd As New SqlCommand
   Dim conn As New SqlConnection(System.Configuration.ConfigurationManager.AppSettings.Item("strConn"))

   saveLogfile(MasterID, IID, Usernaam, "In saveData serverside (solldetail_wijzigen.aspx) geraakt op: " + Date.Now().ToString())

   cn = conn
   cmd.Connection = cn
   cmd.CommandType = CommandType.StoredProcedure
   cmd.CommandText = "uspSoll_SollDetailUpdate"
   cmd.Parameters.Add("@MasterID", SqlDbType.Int).Value = MasterID
   cmd.Parameters.Add("@IID", SqlDbType.Int).Value = IID
   cmd.Parameters.Add("@PostID", SqlDbType.Int).Value = PostID
   cmd.Parameters.Add("@FunctieID", SqlDbType.Int).Value = FunctieID
   cmd.Parameters.Add("@StatusID", SqlDbType.Int).Value = StatusID
   If ResultaatID = 1 Then
      cmd.Parameters.Add("@ResultaatID", SqlDbType.Int).Value = 0
   Else
      cmd.Parameters.Add("@ResultaatID", SqlDbType.Int).Value = ResultaatID
   End If
   cn.Open()
   Try
      cmd.ExecuteNonQuery()
   Catch ex As Exception
      saveLogfile(MasterID, IID, Usernaam, ex.Message.ToString)
   End Try
   cn.Close()
End Sub

I have searched for this bug for 2 days, but I could not solve it. Can anybody please let me why sometime works, sometime not.

Thanks in advance. Juliando

UpdatePanel not working inside Parent GridView ItemTemplate

$
0
0

Hi Guys,

Thanks for viewing this.

Background - There is a  Share Point 2013 Visual Web Part, in our project. It's having 4 nested GridViews together. On click of one Image button 3 grids will get expand. Population is also coded on click of that image button. But, since there is apost back happening, page is blinking and all grids are getting Shrink. So, I decided to keep one update panel on top of these grids' inside 2nd Grids's item template.

Issue - After placing it there, I am able to stop the page blink. It's no more getting post back, on click of the said image button. But, Grids are not being displayed. at all. I chcecked whether I am getting data, by commenting the update panel. Yes, I am getting data. It's displaying. But, once turned on the Update Panel, again Grids are not showing any more.

My ASPX

<asp:gridview runat="server" id="gvParent" width="98%" bordercolor="#00ABA4"
                            horizontalalign="Center" borderstyle="Solid" rowstyle-horizontalalign="Center"
                            selectedrowstyle-verticalalign="Middle"
                            autogeneratecolumns="False" datakeynames="Staff ID" emptydatatext="No Record Found!"
                            borderwidth="1px" allowpaging="True" pagesize="5" OnRowDataBound="gvParent_RowDataBound" OnRowCreated="gvParent_RowCreated" ><Columns><asp:TemplateField><ItemTemplate><img alt="" style="cursor: pointer" src="../../_layouts/15/images/eTRAMS_img/plus.gif" /><asp:Panel ID="PnlClassification" runat="server" Style="display: none"><asp:GridView ID="gvClassification" runat="server" AutoGenerateColumns="false" CssClass="ChildGrid" Width="100%" 
                                                         HeaderStyle-HorizontalAlign="Left"><Columns><asp:TemplateField HeaderStyle-HorizontalAlign="Left"><ItemTemplate><asp:ImageButton ID="ImgClassification" runat="server" ImageUrl="../../_layouts/15/images/eTRAMS_img/plus.gif"
                                                                          CommandArgument='<%# Eval("HistoryClassification") %>'></asp:ImageButton><%--child Gridview--%><asp:UpdatePanel ID="UpdatePanel1" ChildrenAsTriggers="false" runat="server" UpdateMode="Always"><ContentTemplate><asp:Panel ID="pnlCurrent" runat="server" Style="display:none;"><asp:GridView ID="gvCurrent" runat="server" AutoGenerateColumns="false" CssClass="ChildGrid" Width="100%"
                                                                            HeaderStyle-HorizontalAlign="Left" DataKeyNames="TrainingName"><Columns><asp:TemplateField HeaderText="No."><ItemTemplate><asp:Label ID="Label1" runat="server"></asp:Label></ItemTemplate></asp:TemplateField><asp:BoundField DataField="TrainingName" HeaderText="Training Title" /><asp:BoundField DataField="LastTrainingAttendedFrom" HeaderText="Attended Date From" /><asp:BoundField DataField="LastTrainingAttendedTo" HeaderText="Attended Date To" /><asp:BoundField DataField="Refresher" HeaderText="Remark" /></Columns></asp:GridView>                                                                               </asp:Panel><asp:Panel ID="PnlOthers" runat="server" Style="display:none;"><asp:GridView ID="gvOthers" runat="server" AutoGenerateColumns="false" 
                                                                                        CssClass="ChildGrid" Width="100%" HeaderStyle-HorizontalAlign="Left" 
                                                                                        DataKeyNames="TrainingName"><Columns><asp:TemplateField HeaderText="No."><ItemTemplate><asp:Label ID="Label2" runat="server"></asp:Label></ItemTemplate></asp:TemplateField><asp:BoundField DataField="TrainingName" HeaderText="Training Title" /><asp:BoundField DataField="LastTrainingAttendedFrom" HeaderText="Attended Date From" /><asp:BoundField DataField="LastTrainingAttendedTo" HeaderText="Attended Date To" /></Columns></asp:GridView></asp:Panel></ContentTemplate><Triggers><%--<asp:AsyncPostBackTrigger ControlID="ImgClassification" EventName="Click" />--%></Triggers></asp:UpdatePanel><asp:Label ID="lblClassification" runat="server" Text='<%# Eval("HistoryClassification") %>' CommandName="Select"></asp:Label></ItemTemplate></asp:TemplateField></Columns></asp:GridView>                                                        </asp:Panel></ItemTemplate><ItemStyle Width="20px" /></asp:TemplateField><asp:TemplateField HeaderText="No."><ItemTemplate><asp:Label ID="Label4" runat="server"></asp:Label></ItemTemplate></asp:TemplateField><asp:BoundField DataField="Staff Name" HeaderText="Staff Name" /><asp:BoundField DataField="Staff ID" HeaderText="Staff Number" /><asp:BoundField DataField="Position Code" HeaderText="Position Code" /><asp:BoundField DataField="Position Title" HeaderText="Position Name" /><asp:BoundField DataField="Division" HeaderText="Division" /><asp:BoundField DataField="Department" HeaderText="Department" /><asp:BoundField DataField="Section" HeaderText="Section" /></Columns></asp:gridview>

Code Behind

protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            InitializeControl();
            ScriptManager.GetCurrent(this.Page).RegisterAsyncPostBackControl(gvParent);
        }


private void ImgClassification_Click(object sender, ImageClickEventArgs e)
        {
            ImageButton ImgClassification = (sender as ImageButton);
            GridViewRow row = (ImgClassification.NamingContainer as GridViewRow);
            if (ImgClassification.CommandArgument == "Current")
            {
                row.FindControl("pnlCurrent").Visible = true;
                ImgClassification.ImageUrl = "../../_layouts/15/images/eTRAMS_img/minus.jpg";
                GridView gvCurrent = row.FindControl("gvCurrent") as GridView;
                string strPast = ImgClassification.CommandArgument;
                getCurrentHistory(strPast, gvCurrent);

                UpdatePanel updtPnlPast = row.FindControl("UpdatePanel1") as UpdatePanel;
                updtPnlPast.Update();
            }
            if(ImgClassification.CommandArgument == "Past")
            {
                row.FindControl("PnlOthers").Visible = true;
                ImgClassification.ImageUrl = "../../_layouts/15/images/eTRAMS_img/minus.jpg";
                GridView gvOthers = row.FindControl("gvOthers") as GridView;
                string strPast = ImgClassification.CommandArgument;
                getJoinQuery(strPast, gvOthers);

                UpdatePanel updtPnlPast = row.FindControl("UpdatePanel1") as UpdatePanel;
                updtPnlPast.Update();
            }

            if (ImgClassification.CommandArgument == "Others")
            {
                row.FindControl("PnlOthers").Visible = true;
                ImgClassification.ImageUrl = "../../_layouts/15/images/eTRAMS_img/minus.jpg";
                GridView gvOthers = row.FindControl("gvOthers") as GridView;
                string strPast = ImgClassification.CommandArgument;
                getJoinQuery(strPast, gvOthers);

                UpdatePanel updtPnlPast = row.FindControl("UpdatePanel1") as UpdatePanel;
                updtPnlPast.Update();

            }
        }

I have tried as many things as I could have, but no fruits out of it. Can you please figure out, what I am missing here? Which is stopping the display of the grid.
 

UpdatePanel is not working with MultiView control and Panel

$
0
0

1. UpdatePanel is not working with MultiView control. (next and previous button inside the view are not working)  

2.UpdatePanel is not woking on a panel control in which i m generating LinkButtons at run time. 

Collapsible Panel Extender Issue

$
0
0

I have a alphabetized menu for the selection of a customer to manage. I wanted to make this section to collapse so it can be viewed as needed; however, there is an issue when i add the collapsible panel extender and I cannot figure out why it is not working.

The menu consists of 3 listviews, the top listview displays a list of buttons that show a letter of the alphabet, the next 2 listviews display customers that begin with the letter of the alphabet chosen. One is for business customers, the other is for personal

On page load the list is defined by the letter A, then after you select a letter, it displays the clients in each list with the appropriate letter. Everything works fine. The issue begins when I add the extender, the Alpabet listview displays just fine, but the other 2 are not displayed until I collapse the panel then open it again then they display fine; however, I want the panel to be open upon the loading of the page since no customer data will be displayed and you will have to select an account to view, I do not want to have to add an extra click to open the panel when i am loading the page. I want the menus to display so I can select my account, then after I have already selected an account use the collapse to select other accounts as needed during operation.

I remove the collapsible panel, everything works fine, but i have to use hide to make panels invisible, and I would much rather use the collapse if I have the choice

<asp:Panel runat="server" ID="pnlSelectAccountHead" CssClass="select-account" Style="cursor: pointer"><asp:Label ID="lblSelectAccount" runat="server" Text="" /></asp:Panel><ajx:CollapsiblePanelExtender ID="cpeSelectAccount" runat="server" TargetControlID="pnlSelectAccount" ExpandedText="Select Account <i class='fa fa-chevron-up'></i>" CollapsedText="Select Account <i class='fa fa-chevron-down'></i>" TextLabelID="lblSelectAccount" ExpandControlID="pnlSelectAccountHead" CollapseControlID="pnlSelectAccountHead" /><asp:Panel ID="pnlSelectAccount" CssClass="select-account" runat="server"><h2>Select Account To Manage</h2> <asp:UpdatePanel runat="server" ID="upnlSelectAccount"><ContentTemplate><asp:ListView ID="lvSelectCustomerAlpha" runat="server" DataSourceID="sqlSelectCustomerAlpha" DataKeyNames="AccountName"><ItemTemplate><asp:Button Text='<%# Eval("AccountName") %>' runat="server" ID="btnAlpha" CommandArgument='<%# Eval("AccountName") %>' OnClick="btnSelectAccount_Click" /></ItemTemplate><LayoutTemplate><div runat="server" id="itemPlaceholderContainer" class="alpha"><div runat="server" id="itemPlaceholder"></div></div></LayoutTemplate></asp:ListView><asp:SqlDataSource runat="server" ID="sqlSelectCustomerAlpha" ConnectionString='<%$ ConnectionStrings:ConnectionString %>' SelectCommand="SELECT DISTINCT(SUBSTRING(AccountName,1,1)) AS AccountName FROM CuAccountData ORDER BY AccountName" /><asp:ListView ID="lvSelectAccountBusiness" runat="server" DataSourceID="sqlSelectAccountBusiness" DataKeyNames="AccountID"><ItemTemplate><asp:Button Text='<%# Eval("AccountName") %>' runat="server" ID="AccountNameLabel" CommandArgument='<%# Eval("AccountID") %>' OnClick="btnSelectCustomer_Click" /></ItemTemplate><LayoutTemplate><div runat="server" id="itemPlaceholderContainer" class="select-business"><h2>Business Accounts</h2><div runat="server" id="itemPlaceholder"></div></div></LayoutTemplate></asp:ListView><asp:SqlDataSource runat="server" ID="sqlSelectAccountBusiness" ConnectionString='<%$ ConnectionStrings:ConnectionString %>' /><asp:ListView ID="lvSelectAccountPersonal" runat="server" DataSourceID="sqlSelectAccountPersonal" DataKeyNames="AccountID"><EmptyDataTemplate>
							Select A Letter!</EmptyDataTemplate><EmptyItemTemplate>
							Select A Letter!</EmptyItemTemplate><ItemTemplate><asp:Button Text='<%# Eval("AccountName") %>' runat="server" ID="AccountNameLabel" CommandArgument='<%# Eval("AccountID") %>' OnClick="btnSelectCustomer_Click" /></ItemTemplate><LayoutTemplate><div runat="server" id="itemPlaceholderContainer" class="select-personal"><h2>Personal Accounts</h2><div runat="server" id="itemPlaceholder"></div></div></LayoutTemplate></asp:ListView><asp:SqlDataSource runat="server" ID="sqlSelectAccountPersonal" ConnectionString='<%$ ConnectionStrings:ConnectionString %>' /></ContentTemplate></asp:UpdatePanel></asp:Panel>

I can fix it with jQuery and it works, but my question is why is this not working using the ajax toolkit?

Viewing all 5678 articles
Browse latest View live




Latest Images