datalist
-
hi, I create datalist, what mistake this code, Dim oBut As ImageButton = CType(datagrid1.Items(datagrid1.SelectedIndex).FindControl("image"), ImageButton).Attributes.Add("onMouseOver", "window.open('webform1.aspx');")) Error is end of statement expected thanks
-
hi, I create datalist, what mistake this code, Dim oBut As ImageButton = CType(datagrid1.Items(datagrid1.SelectedIndex).FindControl("image"), ImageButton).Attributes.Add("onMouseOver", "window.open('webform1.aspx');")) Error is end of statement expected thanks
I think you have an extra closing bracket.
-
hi, I create datalist, what mistake this code, Dim oBut As ImageButton = CType(datagrid1.Items(datagrid1.SelectedIndex).FindControl("image"), ImageButton).Attributes.Add("onMouseOver", "window.open('webform1.aspx');")) Error is end of statement expected thanks
What mistake? It's VB :-D
-
hi, I create datalist, what mistake this code, Dim oBut As ImageButton = CType(datagrid1.Items(datagrid1.SelectedIndex).FindControl("image"), ImageButton).Attributes.Add("onMouseOver", "window.open('webform1.aspx');")) Error is end of statement expected thanks
you must first set the variable: Dim oBut As ImageButton = CType(datagrid1.Items(datagrid1.SelectedIndex).FindControl("image"), ImageButton) then execute the attributes.add method: oBut.Attributes.Add("onMouseOver", "window.open('webform1.aspx');") daniero