asifbhura
07-11-2006, 02:52 AM
Dear
I have stored data in my database table's
I am displaying data in Repeater by using
this code
SqlConnection cnn = new SqlConnection(ConfigurationSettings.AppSettings["DBConnection"]);
cnn.Open();
SqlCommand cmd = new SqlCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText = "select top 4 blog_title from blogs order by b_date DESC";
cmd.Connection= cnn;
SqlDataAdapter sd = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
sd.Fill(ds);
repblog.DataSource = ds;
repblog.DataBind();
cnn.Close();
this is working ok
but i want only 40 character from my blog_title field from starting
please help me out
Waiting for reply.
regards,
ASIF
I have stored data in my database table's
I am displaying data in Repeater by using
this code
SqlConnection cnn = new SqlConnection(ConfigurationSettings.AppSettings["DBConnection"]);
cnn.Open();
SqlCommand cmd = new SqlCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText = "select top 4 blog_title from blogs order by b_date DESC";
cmd.Connection= cnn;
SqlDataAdapter sd = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
sd.Fill(ds);
repblog.DataSource = ds;
repblog.DataBind();
cnn.Close();
this is working ok
but i want only 40 character from my blog_title field from starting
please help me out
Waiting for reply.
regards,
ASIF