how to add mdf file to app_data folder in asp.net c#?

Posted by Prabu_Spark under ASP.NET on 1/21/2013 | Points: 10 | Views : 3561 | Status : [Member] | Replies : 1
Hi sir,
Tell me steps to add mdf file to app_data folder in asp.net c#. Kindly give me the solution for this problem.


[Hint: I am using the SqlServer 2005 as backend]

With regards,
J.Prabu.
[Email:prbspark@gmail.com]



Responses

Posted by: Ranjeet_8 on: 1/21/2013 [Member] [MVP] Gold | Points: 25

Up
0
Down
Try this

right-click the App_Data folder, point to "Add" and then click "New Item".
select "SQL Server Express DataBase"


<connectionStrings>
<add name="ConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>
</connectionStrings>



Please Mark As Answer if this helps you

.

Prabu_Spark, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response