Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
how to generate rss feed in asp dotnet c#
vikash kumar tiwari
Oct 2 2015 1:02 AM
552
Reply
i try to generate rss feed using this code ,but it give me a exception at run time as "
Cannot attach the file 'c:\users\vikash123\documents\visual studio 2013\Projects\Sample_WebformApplication_RSS\Sample_WebformApplication_RSS\App_Data\aspnet-Sample_WebformApplication_RSS-20150928114944.mdf' as database 'aspnet-Sample_WebformApplication_RSS-20150928114944'."
my code as following
protected void Page_Load(object sender, EventArgs e)
{
string connectionstring = ConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString;
SqlConnection sqlcon = new SqlConnection();
sqlcon.ConnectionString = connectionstring;
SqlCommand cmd = new SqlCommand();
cmd.Connection = sqlcon;
cmd.CommandType = CommandType.Text;
cmd.CommandText = "SELECT TOP 10 * FROM sample";
sqlcon.Open();
rep.DataSource = cmd.ExecuteReader();
rep.DataBind();
sqlcon.Close();
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
DataTable Rows visible false
how to get view count of YouTube video?