Declaring SqlConnection throughout one form

后端 未结 4 1659
感情败类
感情败类 2020-12-22 02:25

I\'m looking for some advise on C# - Please bare in mind that i\'m only a beginner with C# & Sql.

I am looking to design a small program that will Add/Edit/Dele

4条回答
  •  南笙
    南笙 (楼主)
    2020-12-22 02:54

    Add your connection string in web.config file

    
      
    
    

    and in aspx form

        SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["connection string"].ToString());
    

    for more information use this link

提交回复
热议问题