I'm trying build web form with login control. Normally when you drag and drop Login control on aspx form, Visual Studio creates ASPNETDB.MDF database in App_Data folder. In my case it didn't create. So I've created ASPNETDB database within my SQL server using aspnet_regsql tool. Also I have Sql Connection String ("myCS") in web.config file, which connected to my ASPNETDB database in SQL server:
<add name="myCS" connectionString="Server=myserver; Database=ASPNETDB; Persist Security Info=True ;User ID=sa; Password=sa" providerName="System.Data.SqlClient"/>
By default my login control has not data binding with SQL server.
My questions are:
- How to bind Login Control with SQL database?
- Should I create DataSource and define each field manually?
- (This question is not related to two upper questions) How Visual Studio binds login control with local ASPNETDB.MDF database when you drag and drop login control on web form? Where it stores binding code, so I could use it as template?