CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2006
    Posts
    141

    Pop Up Control Extender + Web service call failed:12030/ 500

    Hi , i encounter this in using Pop Up Control Extender inside a gridview.My coding is as below
    coding in aspx
    Code:
     <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4"
                DataKeyNames="empcode" ForeColor="#333333" GridLines="None">
                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <Columns>
                    <asp:BoundField DataField="empcode" HeaderText="empcode" ReadOnly="True" SortExpression="Name" />
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:Image ID="Image1" runat="server" ImageUrl="~/Image/magglass.jpg" />&nbsp;
                            <cc1:popupcontrolextender 
                            ID="PopupControlExtender1" 
                                runat="server" 
                                DynamicServiceMethod="GetDynamicContent"
                                DynamicContextKey='<&#37;# Eval("empcode") %>'
                                DynamicControlID="Panel1"
                                TargetControlID="Image1"
                                PopupControlID="Panel1"
                                Position="Right"
                                >
                            </cc1:popupcontrolextender>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="empname" HeaderText="empname" SortExpression="Title" />
                    <asp:BoundField DataField="telno" HeaderText="telno" SortExpression="Address" />
                </Columns>
                <RowStyle BackColor="#EFF3FB" />
                <EditRowStyle BackColor="#2461BF" />
                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <AlternatingRowStyle BackColor="White" />
            </asp:GridView>
            <asp:Panel ID="Panel1" runat="server">
            </asp:Panel>
    vb coding is as below:
    Code:
    Private Sub populateGridView()
            Dim str As String
            Dim ds As New DataSet
    
            dbconn.Conn.Open()
    
            str = "select empcode,empname,telno from employee limit 5 "
    
            ds = dbconn.SelectQuery(str, dbconn.Conn)
            Me.GridView1.DataSource = ds
            GridView1.DataBind()
    
        End Sub
    
    Protected Sub GridView1_RowCreated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowCreated
            If e.Row.RowType = DataControlRowType.DataRow Then
    
                Dim pce As PopupControlExtender
                Dim behaviorID As String
                Dim i As Image
                Dim OnMouseOverScript As String
                Dim OnMouseOutScript As String
    
    
                pce = e.Row.FindControl("PopupControlExtender1")
    
                behaviorID = String.Concat("pce", e.Row.RowIndex)
                pce.BehaviorID = behaviorID
    
                i = e.Row.Cells(1).FindControl("Image1")
    
                OnMouseOverScript = String.Format("$find('{0}').showPopup();", behaviorID)
                OnMouseOutScript = String.Format("$find('{0}').hidePopup();", behaviorID)
    
                i.Attributes.Add("onmouseover", OnMouseOverScript)
                i.Attributes.Add("onmouseout", OnMouseOutScript)
            End If
    
        End Sub
    <System.Web.Services.WebMethodAttribute(), System.Web.Script.Services.ScriptMethodAttribute()> _
        Public Function GetDynamicContent(ByVal contextKey As String) As String
    
            Dim sTemp = New StringBuilder()
    
    
            sTemp.Append("<table>")
            sTemp.Append("<tr><td><b>Territories:</b></td></tr>")
    
            sTemp.Append("<tr><td>" + "zxczc" + "</td></tr>")
    
            sTemp.Append("</table>")
    
            Return sTemp.ToString()
        End Function
    Does anyone has idea on this, i have try few ways like adding a web services call myWebServices.asmx where it's location is same as the web pages and having DynamicServicePath="CourtService.asmx" in pop up control extender. But it still bring me to the same error.
    Last edited by johnsonlim026; May 13th, 2009 at 11:56 AM.

  2. #2
    Join Date
    Jun 2010
    Posts
    1

    Thumbs up Re: Pop Up Control Extender + Web service call failed:12030/ 500

    You need not create a web service, simply copy the given code in the .aspx.cs file and try to debug the function using the asp.net debugger Or it could be the problem with the query you have entered.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured