Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
P

Palash Biswas

@Palash Biswas
About
Posts
30
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Deserialize following Xml.????
    P Palash Biswas

    use the code below..

    System.Xml.Serialization.XmlRootAttribute xRoot = new System.Xml.Serialization.XmlRootAttribute();
    xRoot.ElementName = "EnvironmentConfigurations";
    xRoot.IsNullable = true;
    System.Xml.Serialization.XmlSerializer ser = new System.Xml.Serialization.XmlSerializer(typeof(<your Type>), xRoot);
    <your type> x = (<your Type>)ser.Deserialize(new System.IO.StringReader());

    ASP.NET wpf wcf sysadmin xml help

  • Javascript does not work with firefox browser?
    P Palash Biswas

    use the bellow code..

    if (window.event) // eg. IE
    {
    keyASCII = window.event.keyCode;

        }
        else if (event.which) // eg. Firefox
        {
            keyASCII = event.which;
        }
    
    ASP.NET help javascript sysadmin tools architecture

  • Retrieving the connection string from web.confi
    P Palash Biswas

    If you don;t want to use Session object then declare a Static hash table and put all the Connection string when you get it and retrieve it through out the page

    ASP.NET csharp question database help tutorial

  • MessageBox with custom background color
    P Palash Biswas

    You must have to write a custom control to do that...

    .NET (Core and Framework) csharp question c++ business

  • Download multiple Xml file
    P Palash Biswas

    use ...

    Response.ContentType = "text/xml";
    Response.AppendHeader("Content-Disposition", "attachment; filename=mmm.xml");
    Response.TransmitFile(Server.MapPath("~/images/mmm.jpg"));
    SqlDataAdapter da = null;
    try
    {
    con = new SqlConnection();
    con.ConnectionString = ConfigurationSettings.AppSettings["DSN"];
    da = new SqlDataAdapter("select * from card_details", con);
    DataSet ds = new DataSet(); da.Fill(ds, "card_details");
    ds.WriteXml(Response.OutputStream);
    Response.End();
    }
    catch (SqlException ex)
    {
    throw new System.Exception("Error -- " + ex.Message);
    }
    catch (Exception exp)
    {
    throw new System.Exception("Error -- " + exp.Message);
    }
    finally
    {
    con.Close(); da.Dispose();
    }

    ASP.NET help database xml

  • Download multiple Xml file
    P Palash Biswas

    I think , The below code will help you much

    Response.ContentType = "text/xml";
    Response.AppendHeader("Content-Disposition", "attachment; filename=mmm.xml");
    Response.TransmitFile(Server.MapPath("~/images/mmm.jpg"));
    SqlDataAdapter da = null;
    try
    {
    con = new SqlConnection();
    con.ConnectionString = ConfigurationSettings.AppSettings["DSN"];
    da = new SqlDataAdapter("select * from card_details", con);
    DataSet ds = new DataSet(); da.Fill(ds, "card_details");
    ds.WriteXml(Response.OutputStream);
    Response.End();
    }
    catch (SqlException ex)
    {
    throw new System.Exception("Error -- " + ex.Message);
    }
    catch (Exception exp)
    {
    throw new System.Exception("Error -- " + exp.Message);
    }
    finally
    {
    con.Close(); da.Dispose();
    }

    ASP.NET help database xml

  • Download multiple Xml file
    P Palash Biswas

    Try this i think it will help you; Response.ContentType = "text/xml"; Response.AppendHeader("Content-Disposition", "attachment; filename=mmm.xml"); Response.TransmitFile(Server.MapPath("~/images/sailbig.jpg")); SqlDataAdapter da = null; try { con = new SqlConnection(); con.ConnectionString = ConfigurationSettings.AppSettings["DSN"]; da = new SqlDataAdapter("select * from card_details", con); DataSet ds = new DataSet(); da.Fill(ds, "card_details"); ds.WriteXml(Response.OutputStream); Response.End(); } catch (SqlException ex) { throw new System.Exception("Error -- " + ex.Message); } catch (Exception exp) { throw new System.Exception("Error -- " + exp.Message); } finally { con.Close(); da.Dispose(); } }

    ASP.NET help database xml

  • Download multiple Xml file
    P Palash Biswas

    This will help you much , I think it works fine :-D

    Response.ContentType = "text/xml";
    Response.AppendHeader("Content-Disposition", "attachment; filename=mmm.xml");
    Response.TransmitFile(Server.MapPath("~/images/mmm.jpg"));
    SqlDataAdapter da = null;
    try
    {
    con = new SqlConnection();
    con.ConnectionString = ConfigurationSettings.AppSettings["DSN"];
    da = new SqlDataAdapter("select * from card_details", con);
    DataSet ds = new DataSet(); da.Fill(ds, "card_details");
    ds.WriteXml(Response.OutputStream);
    Response.End();
    }
    catch (SqlException ex)
    {
    throw new System.Exception("Error -- " + ex.Message);
    }
    catch (Exception exp)
    {
    throw new System.Exception("Error -- " + exp.Message);
    }
    finally
    {
    con.Close(); da.Dispose();
    }

    modified on Thursday, February 4, 2010 6:01 AM

    ASP.NET help database xml

  • Download multiple Xml file
    P Palash Biswas

    I think you are not use win form application . Is that true if it is then you can't do it using previous procedure.Please use a Custom pop up to do this.

    ASP.NET help database xml

  • Download multiple Xml file
    P Palash Biswas

    try this

    if (saveFileDialog.ShowDialog() == DialogResult.OK)

    ASP.NET help database xml

  • Download multiple Xml file
    P Palash Biswas

    I wrote my code in VS 2008. Under dialog section of toolbox you can get the specified control. TRY this Code

    System.Windows.Forms.SaveFileDialog saveFileDialog = new System.Windows.Forms.SaveFileDialog();

    saveFileDialog.Filter = "XML Files (*.xml)|*.*";

    if (saveFileDialog.ShowDialog(this) == DialogResult.OK)

    {

    string FileName = saveFileDialog.FileName;

    if (FileName.Trim() != "")

    {

    // your Code here
    }

    }

    ASP.NET help database xml

  • Download multiple Xml file
    P Palash Biswas

    use below code

    private void button1_Click(object sender, EventArgs e)
    {
    saveFileDialog1.FileOk += new CancelEventHandler(saveFileDialog1_FileOk);
    saveFileDialog1.ShowDialog(this);

        }
    
        void saveFileDialog1\_FileOk(object sender, CancelEventArgs e)
        {
            SaveFileDialog ss = sender as SaveFileDialog;
    
            SqlDataAdapter da = null;
            try
            {
                con = new SqlConnection();
                con.ConnectionString = ConfigurationSettings.AppSettings\["DSN"\];
                da = new SqlDataAdapter("select \* from card\_details", con);
                DataSet ds = new DataSet(); da.Fill(ds, "card\_details");
                ds.WriteXml(ss.FileName);
            }
            catch (SqlException ex)
            {
                throw new System.Exception("Error -- " + ex.Message);
            }
            catch (Exception exp)
            {
                throw new System.Exception("Error -- " + exp.Message);
            }
            finally
            {
                con.Close(); da.Dispose();
            }
            
        }
    

    saveFileDialog1 is SaveFileDialog type win control.

    ASP.NET help database xml

  • What is the return value of the insert and delete sql statement
    P Palash Biswas

    Cool!Enjoy! :-D

    C# question database sql-server sysadmin

  • What is the return value of the insert and delete sql statement
    P Palash Biswas

    I think you should put "SET NOCOUNT ON" in Top of your SP and "SET NOCOUNT OFF" At the end of your SP THANKS

    C# question database sql-server sysadmin

  • What is the return value of the insert and delete sql statement
    P Palash Biswas

    For UPDATE, INSERT, and DELETE statements, the return value is the number of rows affected by the command. For all other types of statements, the return value is -1. If a rollback occurs, the return value is also -1.

    C# question database sql-server sysadmin

  • want to avoid losing data of previous screen
    P Palash Biswas

    cache your previuos data and when you come back retrieve your data from cache... Thanks

    ASP.NET

  • how to maintain viewstate?
    P Palash Biswas

    You can cache your all search page details into a cache and repopulate the search page when you come back from cache... Thanks

    ASP.NET javascript html tutorial question

  • how to update parent window automatically ??
    P Palash Biswas

    Use window.parent.ParentPageJavascriptMethod(); Write ParentPageJavascriptMethod() in your parent page to update tpur parent page content. Thanks

    ASP.NET tutorial visual-studio question announcement

  • how to give access to different user for different pages in asp.net with c#
    P Palash Biswas

    Put this below attribute in the top of your Page Code behind and Name Parameter is the permitted user for this page.... [PrincipalPermission(SecurityAction.Demand,Name=@"kovairindia\palash",Unrestricted=false)] Thanks

    ASP.NET csharp asp-net tutorial

  • LINQ to parse EventLog Query [modified]
    P Palash Biswas

    You can use the below code if you using LINQ to Objects

    private void button1_Click(object sender, EventArgs e)
    {
    List<Customer> customers = new List<Customer>();
    customers.Add(new Customer { CustomerID = "A12I", CustomerName = "Palash" });
    customers.Add(new Customer { CustomerID = "B20G", CustomerName = "Ankesh" });
    customers.Add(new Customer { CustomerID = "A100I", CustomerName = "Subhadip" });
    customers.Add(new Customer { CustomerID = "C12G", CustomerName = "Namita" });
    var result = (from c in customers
    where c.CustomerID.StartsWith("A") && c.CustomerID.EndsWith("I")
    select c).ToList();
    foreach (Customer c in result)
    {
    MessageBox.Show(c.CustomerName);
    }
    }

    }
    
    public class Customer
    {
        public string CustomerID;
        public string CustomerName;
    }
    

    for Search A%I . In case Of Search %I% you can use String Contains method to do that In Case of LINQ to SQL You can Use the Syntax like

    var result = (from c in db.Customers
    where System.Data.Linq.SqlClient.SqlMethods.Like(c.CustomerID, "A%I")
    select c).ToList();

    C# csharp database linq help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups