Hi Jaheena, You mean to retrieve data from database right? If yes then select id, image,description from table_name else can you please ellaborate your question.
jaheena as you said you have taken data from database but you want to scroll those data. May i know what you mean here by scroll, according to me, you are trying to show data in some control right?
jaheena jamal75 reputationPosted May 16, 2011, 1:47 AM EDT
0
sir,
I already retrieve datas from database. And then I want to scroll these datas . what can i do for that?
0
Vijay YadavRank #1,637 · 943 reputationPosted May 16, 2011, 1:50 AM EDT
0
Are you showing data in datagridview, if so then datagridview will add the scroll automatically as the data will get exceeded or else can you post your code here?
jaheena jamal75 reputationPosted May 16, 2011, 3:09 AM EDT
0
sir,
I tried that you say. like following
VB.NET
PlaceHolder2.Controls.Add("" + table + "");
But it has error.
The erroris: The best overloaded method match for'System.Web.UI.ControlCollection.Add(System.Web.UI.Control)' has some invalid arguments.
what is the reason for this error?
0
Suthish NairRank #92 · 22.8K reputationPosted May 16, 2011, 3:14 AM EDT
0
Jaheena,
Be specific with your thread, so members can provide exact solutions.
Using Jquery you can scroll the text.. Lots of sample available on web.
Vijay,
The HTML <marquee> element is obsolete and should not be used in new HTML documents.
0
Vijay YadavRank #1,637 · 943 reputationPosted May 16, 2011, 3:21 AM EDT
0
Suthish, You are write acutally i am not friendly with Jquery hence i went for this one. Anyway thanks for suggesting this.
Vijay YadavRank #1,637 · 943 reputationPosted May 16, 2011, 2:52 AM EDT
on page load event and it is working, take one literal control and assign the marquee like this:
string strData="Hello";
string strMar="";
Literal1.Text=strMar +"
";
And in your case, can you just check by modifying
PlaceHolder2.Controls.Add("<MARQUEE>"+table+"");
Vijay YadavRank #1,637 · 943 reputationPosted May 15, 2011, 10:51 PM EDT
jaheena jamal75 reputationPosted May 15, 2011, 11:09 PM EDT
Already i took datas from databse. And i want to scroll this datas.
Regards
Jahi
Vijay YadavRank #1,637 · 943 reputationPosted May 15, 2011, 11:53 PM EDT
jaheena jamal75 reputationPosted May 16, 2011, 12:29 AM EDT
Abhimanyu K VatsaRank #14 · 51.7K reputationPosted May 16, 2011, 1:32 AM EDT
Anil KumarRank #367 · 6.8K reputationPosted May 16, 2011, 1:33 AM EDT
ex.
public void BindData(int ID)
{
SqlConnection myConnection = new SqlConnection("-----put your connectin string -----");
myConnection.Open();
string sql = "SELECT * FROM [myTableName] WHERE [id] = " + ID;
SqlCommand myCommand = new SqlCommand(sql, myConnection);
SqlDataReader myDR = null;
myDR = myCommand.ExecuteReader();
if(myDR.HasRows)
{
txtName.Text = myDR["id"];
// ...and so on
}
}
jaheena jamal75 reputationPosted May 16, 2011, 1:47 AM EDT
Vijay YadavRank #1,637 · 943 reputationPosted May 16, 2011, 1:50 AM EDT
jaheena jamal75 reputationPosted May 16, 2011, 1:58 AM EDT
I think you'll not understand what i say. I want to scroll automatically just like marquee.
Regards
Jahi
Vijay YadavRank #1,637 · 943 reputationPosted May 16, 2011, 2:01 AM EDT
jaheena jamal75 reputationPosted May 16, 2011, 2:10 AM EDT
how can i do that? How can i place in marquee tag?
Vijay YadavRank #1,637 · 943 reputationPosted May 16, 2011, 2:14 AM EDT
jaheena jamal75 reputationPosted May 16, 2011, 2:20 AM EDT
how can i give dynamic controls into marquee tag
regards
jahi
Anil KumarRank #367 · 6.8K reputationPosted May 16, 2011, 2:26 AM EDT
http://www.c-sharpcorner.com/UploadFile/munnamax/scrollingNews02252006101507AM/scrollingNews.aspx
Vijay YadavRank #1,637 · 943 reputationPosted May 16, 2011, 2:27 AM EDT
Anil KumarRank #367 · 6.8K reputationPosted May 16, 2011, 2:30 AM EDT
http://www.c-sharpcorner.com/UploadFile/prathore/6651/
jaheena jamal75 reputationPosted May 16, 2011, 2:36 AM EDT
con.Open();
SqlCommand cmd = new SqlCommand("select top(1) proprtyid,propdistrict,propprice,proplocation from reginfo where confirmation='confirmed' order by dateconfrm desc", con);
SqlDataReader reader = cmd.ExecuteReader();
while (reader.Read())
{
recpid = reader[0].ToString();
recdistr = reader[1].ToString();
recprice = reader[2].ToString();
recloca = reader[3].ToString();
Table table = new Table();
table.Width = 231;
TableRow tr = new TableRow();
TableCell Tc = new TableCell();
Tc.Width = 231;
ImageButton imgbtn = new ImageButton();
imgbtn.ImageUrl = "image1.aspx?pid=" + recpid;
imgbtn.PostBackUrl = "moredetails.aspx?pid=" + recpid;
imgbtn.Width = 200;
imgbtn.Height = 150;
Tc.Controls.Add(imgbtn);
tr.Cells.Add(Tc);
table.Rows.Add(tr);
TableRow tr2 = new TableRow();
TableCell Tc2 = new TableCell();
Tc2.Width = 231;
LinkButton lnkbtn2 = new LinkButton();
lnkbtn2.Text = "District:" + recdistr;
lnkbtn2.CssClass = "dynamiclnkbtn2";
lnkbtn2.PostBackUrl = "moredetails.aspx?pid=" + recpid;
Tc2.Controls.Add(lnkbtn2);
tr2.Cells.Add(Tc2);
table.Rows.Add(tr2);
TableRow tr3 = new TableRow();
TableCell Tc3 = new TableCell();
Tc3.Width = 231;
LinkButton lnkbtn3 = new LinkButton();
lnkbtn3.Text = "Location:" + recloca;
lnkbtn3.CssClass = "dynamiclnkbtn2";
lnkbtn3.PostBackUrl = "moredetails.aspx?pid=" + recpid;
Tc3.Controls.Add(lnkbtn3);
tr3.Cells.Add(Tc3);
table.Rows.Add(tr3);
TableRow tr4 = new TableRow();
TableCell Tc4 = new TableCell();
Tc4.Width = 231;
LinkButton lnkbtn4 = new LinkButton();
lnkbtn4.Text = "Price:" + recprice;
lnkbtn4.CssClass = "dynamiclnkbtn2";
lnkbtn4.PostBackUrl = "moredetails.aspx?pid=" + recpid;
Tc4.Controls.Add(lnkbtn4);
tr4.Cells.Add(Tc4);
table.Rows.Add(tr4);
PlaceHolder2.Controls.Add(table);
jaheena jamal75 reputationPosted May 16, 2011, 3:09 AM EDT
I tried that you say. like following
PlaceHolder2.Controls.Add("" + table + ""); But it has error. The error is: The best overloaded method match for 'System.Web.UI.ControlCollection.Add(System.Web.UI.Control)' has some invalid arguments. what is the reason for this error?Suthish NairRank #92 · 22.8K reputationPosted May 16, 2011, 3:14 AM EDT
Be specific with your thread, so members can provide exact solutions.
Using Jquery you can scroll the text.. Lots of sample available on web.
Vijay,
The HTML <marquee> element is obsolete and should not be used in new HTML documents.
Vijay YadavRank #1,637 · 943 reputationPosted May 16, 2011, 3:21 AM EDT
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts