Host a WebForms database connected application

Larry Ulmer 1 Reputation point
2022-11-13T19:12:52.85+00:00

Can I post a WebForms database connected application here with Microsoft Learn?

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,254 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,713 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Ronen Ariely 15,096 Reputation points
    2022-11-13T20:34:07.503+00:00

    Hi,

    I am not sure what you mean by "post a WebForms database ". How can you post a database?!?

    Are you asking if you can post questions regarding a WebForms database which is connected by an application?

    If this is the question, and you means asp.net webform technology, then the answer is yes.

    You just need to use the relevant tag, so the right people will read the question (and you will need to close previous thread which already got answers)

    The tag which you select dotnet-aspnet-webforms is the right one in this case

    0 comments No comments

  2. QiYou-MSFT 4,306 Reputation points Microsoft Vendor
    2022-11-14T05:29:17.323+00:00

    Hi @Larry Ulmer ,
    If you mean to know how to connect to a SQL database in Webforms, I can give you the following code:
    Web.config:
    SQL Server account authentication login:

    <appSettings>  
        <add key="connection name" value="server=server name;database=database name;uid=username;pwd=password;"/>  
    </appSettings>  
    

    Windows authenticates the logon:

    <appSettings>  
        <add key="connection name" value="server=server name;database=database name;Integrated Security=True;"/>  
    </appSettings>  
    

    Get the connection string or connection object (you can use it directly if you need to connect)

    string ConnStr = ConfigurationManager.AppSettings["connection"].ToString();  
        SqlConnection conn = new SqlConnection(ConnStr);  
        return conn;  
    

    If you want to present your ideas to everyone, go to this and leave your tech blog.

    Best regards,
    Qi You

    0 comments No comments