.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

WebService call failed error in asp.net

Posted By: kavitha     Posted Date: November 22, 2010    Points:2   Category :ASP.Net
hi friends,

WebService call failed error when i click button ajax popup window.
i want to if i click the image in gridview display the window.

please give the solution.

thanks.


<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>

</td>
<tr>
<td style="width: 100px">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Panel ID="Panel1" runat="server" BackColor="#ffffff"
BorderColor="#dadada" BorderStyle="Solid" BorderWidth="4px"
Height="190px" Width="350px" Font-Names="Arial" Font-Size="10pt">
<asp:TextBox ID="TextBox1" runat="server" Style="position: relative"></asp:TextBox></asp:Panel>

</ContentTemplate>
</asp:UpdatePanel>
<cc1:PopupControlExtender ID="PopupControlExtender1" runat="server"
PopupControlID="Panel1"
TargetControlID="Button1"
DynamicContextKey='<%# Eval("ERID") %>'
DynamicControlID="Panel1"
DynamicServiceMethod="GetDynamicContent" Position="Bottom">
</cc1:PopupControlExtender>
</td>

</tr>
<tr>
<td style="width: 100px">
<asp:Button ID="Button1" runat="server" Style="position: relative" Text="upload" OnClick="Button1_Click" /></td>

</tr>
<tr>
<td style="width: 100px; height: 15px;">
<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" Font-Bold="True"
Height="1px" Style="left: 0px; position: relative; top: 18px" Width="190px" >
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:Image ID="Image1" runat="server" Height="90" ImageUrl='<%# FormatURL(DataBinder.Eval(Container.DataItem, "sid")) %>'
Width="180" />
<td><b>


<asp:LinkButton id="linkbtnremove" runat="server" OnClick="linkbtnremove_Click" CssClass="OTextColor" Font-Bold="true" CommandArgument='<%#Eval("erId") %>' CausesValidation="false" >Remove</asp:LinkButton>

<br />
</ItemTemplate>
</asp:TemplateField>

</Columns>
</asp:GridView>





SqlConnection con = new SqlConnection();
SqlCommand cmd = new SqlCommand();
SqlDataReader dr;

public SqlConnection OpenConnection(SqlConnection c)
{
c.ConnectionString = ConfigurationManager.AppSettings["ConnectionString"];

if (c.State == ConnectionState.Closed)
{
c.Open();
}
return c;
}
protected void linkbtnremove_Click(object sender, System.EventArgs e)
{

OpenConnection(con);
cmd.Connection = con;


cmd.CommandText = "UPDATE erlogo SET imgData = null WHERE Name = '" + lbl_sessername.Text + "'";
cmd.ExecuteNonQuery();
con.Close();

}

protected void Page_Load(object sender, EventArgs e)
{

lbl_sesseid.Text = Session["erid"].ToString();
lbl_sessername.Text = Session["ername"].ToString();



OpenConnection(con);
cmd.Connection = con;

cmd.CommandText = "SELECT er.*,er1.ERID,er1.sid FROM erreg er1 join erlogo er on er.ERID=er1.ERID where er1.ERID='" + lbl_sesseid.Text + "'";


dr = cmd.ExecuteReader();
GridView2.DataSource = dr;
GridView2.DataBind();
con.Close();


}
public string FormatURL(System.Object strArgument)
{
return ("homeimageread.aspx?sid=" + strArgument);
}


protected void Button1_Click(object sender, EventArgs e)
{


}


Responses
Author: Amit Mehra             
Posted Date: January 30, 2011     Points: 5   

Hi,

What error are you getting..Did you solve the problem?

Thanks,
Amit
Please "Mark As Answer " if this post help you.


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend