Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
How to Select and save photos ?
Abdalla Elawad
Dec 8 2016 7:27 AM
293
Reply
I Have more than 20.000 photos , i want to save in folder , i have try create folder in visual studio see to steps below :
1/ create folder in V.Studio
2/Create Table in SQL
3/ create stored Proceures (Select)
I will attached for all steps like photos
but this trying is failed .
Code below :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;
using System.Configuration;
using System.IO;
namespace OperationCashPlan
{
public partial class WebFormTest : System.Web.UI.Page
{
SqlConnection Conn = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["Cash_PlanConne"].ConnectionString);
protected void Page_Load(object sender, EventArgs e)
{
}
protected void DropDownList4_SelectedIndexChanged(object sender, EventArgs e)
{
try
{
SqlCommand xp = new SqlCommand("Select_Images2", Conn);
xp.Parameters.Add("@EmpName", SqlDbType.Char).Value = (DropDownList4.SelectedValue);
Conn.Open();
xp.ExecuteNonQuery();
SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = xp;
DataSet ds = new DataSet();
da.Fill(ds, "Table_1");
GridView1.DataSource = ds;
GridView1.DataBind();
Conn.Close();
}
catch
{
Label1.Text = " Not Found Image or No.";
}
}
}
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
Validation for all the Properties of the Class
C# - If datetime return null show 'Unknown' message.