I have a problem with Repeater. After create connection to database, run website then appear message error: External component has thrown an exception. This is my connection: private void Page_Load(object sender, System.EventArgs e) { SqlConnection myConnection = new SqlConnection("server=local;database=Rainbow;uid=sa;pw="); SqlDataAdapter myCommand = new SqlDataAdapter("select * from rb_Diem",myConnection); DataSet ds = new DataSet(); myCommand.Fill(ds,"rb_Diem"); rptDSachdiem.DataSource= ds; rptDSachdiem.DataBind(); }
Repeater's of me name rptDSachdiem. <%# DataBinder.Eval(Container.DataItem, "STT")%> <%# DataBinder.Eval(Container.DataItem, "TenMon")%> <%# DataBinder.Eval(Container.DataItem, "Diem")%> <%# DataBinder.Eval(Container.DataItem, "Hoctrinh")%> <%# DataBinder.Eval(Container.DataItem, "TBC")%> <%# DataBinder.Eval(Container.DataItem, "STT")%> <%# DataBinder.Eval(Container.DataItem, "TenMon")%> <%# DataBinder.Eval(Container.DataItem, "Diem")%> <%# DataBinder.Eval(Container.DataItem, "Hoctrinh")%> <%# DataBinder.Eval(Container.DataItem, "TBC")%>
songthan1
Posts
-
I have a problem with Repeater -
The difference: DataGrid,DataList,RepeaterWho's tell me the differences between: DataGrid and DataList,DataGrid and Repeater,DataList and Repeater? Can you direct me to using them and send to me some documents or ebook about them? or give me a specific example?:confused:.Thanks a lot
-
Insert a dynamic image into aspxHow to insert a dynamic image or picture into a web aspx. what's command? Ex: flash. Thanks:confused:
-
Design aspxI want to create a web form by aspx. But I don't know how to access database (SQL Server.).Ex: Creat one page about mark management. I want to insert,update,display them . What is
redirect
in C#? Thanks for help me:confused: -
write codeI've just learning about asp.net by C#. I want to know how to creat a object about date, month, year. It's relate to insert into SQL Server. Example: Brithday: Date: dropdownlist Month: dropdownlist Year: dropdownlist Everyone can help me understand about it and create it????:confused: