Code

Hi all,
I am finding the following error on firefox

XML Parsing Error: no element found
Location: http://test.freecreditcards4all.com.asp1-10.dfw1-2.websitetestlink.com/testforconnection.aspx
Line Number 1, Column 1:

 

Whereas on local there is no error the code contains:

 

Code
protected void Button1_Click(object sender, EventArgs e)

    {

     try
PowerShell
        {

         SqlConnection con = new SqlConnection(WebConfigurationManager.ConnectionStrings["PintooConnection"].ConnectionString);

            DataSet Ds = new DataSet();

            SqlDataAdapter Da = new SqlDataAdapter("Select * from Emails", con);

            Da.Fill(Ds);





            for (int i = 0; i 0].Rows.Count; i++)

            {

               Label1.Text = Label1.Text + i.ToString() ++ Ds.Tables[0].Rows[i][1].ToString() + " 
";



                SqlConnection test = new SqlConnection(WebConfigurationManager.ConnectionStrings["PintooConnection"].ConnectionString);

                string qry = "Insert into test values ('" + Ds.Tables[0].Rows[i][1].ToString() + "','" + Ds.Tables[0].Rows[i][2].ToString() + "','" + Ds.Tables[0].Rows[i][3].ToString() + "','" + Ds.Tables[0].Rows[i][4].ToString() + "','" + Convert.ToDateTime(Ds.Tables[0].Rows[i][5].ToString()) + "')";

             

                SqlCommand cmd = new SqlCommand(qry, con);

                con.Open();

                cmd.ExecuteNonQuery();

                con.Close();                

                cmd.Dispose();                

            }

        }

        catch (Exception ex)

        {

            Label1.Text = ex.ToString();

        } 



    }

 

.aspx code is here:

 

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="testforconnection.aspx.cs" Inherits="Admin_testforconnection" %>

 

 

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

    <title>title>

head>

 

<body>

    <form id="form1" runat="server">

    <div>

   

        <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />

  

   

    div>

   

    <asp:Label ID="Label1" runat="server" Text="">asp:Label>

    form>

    <% Response.ContentType = "text/HTML";%>

body>

html>