I have a DataList and I have added a datatable in back end. How can I add css to this table? <asp:DataList ID="DataList1" runat="server" RepeatColumns = "3"> <ItemTemplate> <%# DataBinder.Eval(Container.DataItem, "StringValue") %> </ItemTemplate> </asp:DataList> Function CreateDataSource() As ICollection 'create a DataTable Dim dt As DataTable = New DataTable dt.Columns.Add(New DataColumn("StringValue", GetType(String))) Dim dr As DataRow ... While reader.Read() dr = dt.NewRow() dr(0) = "test" dt.Rows.Add(dr) CreateDataSource = New DataView(dt) End While End Function

Member Avatar
Member Avatar
+0 forum 1

Hey Experts >>>>> Please help me out .... i want this type of grid to be generated horizontally ... but unfortunately in asp.net gridview is not showing horizontal options ..... another interesting fact is that all the products shown in this page is UNIQUE ... and Pagination is also included ... how ??? please help me ... here is the link www.mxonline.com.pk check its center product grid on the main page .... i want to use SQL database in this project . someone told me to use datalist ... but "if for e.g there are 20 unique products showing on …

Member Avatar
Member Avatar
+0 forum 1

Hello everyone, This is my first week in a new language and I am having trouble with html5. Here is the question and then I will post my code. I need create an autocomplet input element with an assciated datalist that contains the days of the week. I have everything the way it needs to be but for some reason I am not getting my dropdown list of all of the week days. I need to be able to start typing in a day of the week and have it pop up in a drop down list to select from. …

Member Avatar
Member Avatar
+0 forum 4

I am currently using a datalist to update the database with a textbox control. The problem is that when I am pressing "Edit" and entering values in the textbox and when trying to update the database, the database is not getting updated with the entered value. Could someone please let me know the exact procedure to update the database with the value from the textbox? <asp:DataList ID="DataList1" runat="server" DataKeyField="memberID" oneditcommand="DataList1_EditCommand" onupdatecommand="DataList1_UpdateCommand"> private void Load(){ dal db = new dal(); DataTable dt = new DataTable(); dt = db.run_dr("SELECT [memberID], [Name], [Family], [Tell], [Email]); DataList1.DataSource = dt; DataList1.DataBind(); protected void DataList1_UpdateCommand(object source, …

Member Avatar
Member Avatar
+0 forum 4

I have one form having One DataList In which i have two table one having Header Template and other having Item Template....... Code Of aspx page is as follows..... <asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1"> <HeaderTemplate> <div> <table> <tr> <td style="width:245px; text-align:center;"> Image</td> <td style="width:450px;text-align:center;"> Item Description</td> <td style="width:260px;text-align:center;"> Price</td> <td style="width:322px;text-align:center;"> Qty</td> <td style="width:300px;text-align:center;"> Remove</td> <td style="width:310px;text-align:center;"> Total</td> </tr> </table> </div> </HeaderTemplate> <ItemTemplate> <div> <table class="style1" style="border:solid 3px purple"> <tr> <td style="width:200px;border: thin ridge #FF00FF;"> <asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("Product_Image") %>' Height="100px" Width="100px" /> &nbsp;</td> <td style="width:500px;border: thin ridge #FF00FF;"> <asp:Label ID="Item_DescriptionLabel" runat="server" Text='<%# Eval("Item_Description") %>' /> &nbsp;</td> <td style="width:300px;border: thin …

Member Avatar
Member Avatar
+0 forum 6

# Asp.net with c# language # I have 3 table let say table1 ,table2 and table3 Table1 with 2 columns pid and productname pid(P.k) productname 1 abc 2 qwe 3 ewre 4 jui Table2 with 2 columns fid and imagename fid(P.k) imagename 1 a 2 b 3 c 4 d 5 e 6 f 7 g 8 h 9 i Table3 with 3 column name id pid whick is foreign key and fid with foreign key of table1 and table2 respectively id pid(F.k) fid(F.k) 1 1 1 2 1 4 3 1 6 4 1 8 5 2. 2 6 …

Member Avatar
+0 forum 0

I have 3 table let say table1 ,table2 and table3 Table1 with 2 columns pid and productname pid(P.k) productname 1 abc 2 qwe 3 ewre 4 jui Table2 with 2 columns fid and imagename fid(P.k) imagename 1 a 2 b 3 c 4 d 5 e 6 f 7 g 8 h 9 i Table3 with 3 column name id pid whick is foreign key and fid with foreign key of table1 and table2 respectively id pid(F.k) fid(F.k) 1 1 1 2 1 4 3 1 6 4 1 8 5 2. 2 6 2 4 here is my tables …

Member Avatar
Member Avatar
+0 forum 2

Hi, I have a problem finding a textbox control which is within panel and this panel is within datalist control. I would like to get textbox.text property and I tried several ways but I always get empty string "" although textbox contain some text in it. My code is below: aspx page <asp:DataList ID="dlDataList" runat="server" onitemcommand="dlDataList_ItemCommand"> <ItemTemplate> <asp:Panel ID="pnlReply" runat="server" Visible="False"> <asp:TextBox ID="txtTextBox" runat="server"</asp:TextBox><br /> <asp:LinkButton ID="lnkbtnSend" CommandName="Send" runat="server">Send</asp:LinkButton> </asp:Panel><br /> <asp:LinkButton ID="OpenPanel" CommandName="OpenPanel" runat="server">Open panel</asp:LinkButton> </ItemTemplate> </asp:DataList> aspx.cs page protected void dlDataList_ItemCommand(object source, DataListCommandEventArgs e) { if (e.CommandName == "OpenPanel") { Panel pnlReply = (Panel)e.Item.FindControl("pnlReply"); pnlReply.Visible = true; } …

Member Avatar
Member Avatar
+0 forum 2

Hi all, I am using DataList and when i run my project the table of the datalist doesn't appear?!!! aspx.vb file Imports System.Data.SqlClient Public Class SLP_1 Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load ' TextBox1.Text = Session(logAccount) End Sub Protected Sub DataList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles DataList1.SelectedIndexChanged Dim con As SqlConnection = New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename='C:\Users\sony\Documents\Visual Studio 2010\Projects\SADA\SADA\App_Data\SADA2.mdf';Integrated Security=True;User Instance=True") Dim cmdStr As String = "SELECT PateintTbl.PateintId, PateintTbl.P_f_Name, PateintTbl.P_L_Name, PateintTbl.SLP_ID FROM PateintTbl INNER JOIN SLP ON PateintTbl.SLP_ID = Session(logAccount)" Dim da As SqlDataAdapter = New SqlDataAdapter(cmdStr, con) Dim ds As …

Member Avatar
Member Avatar
+0 forum 7

I attempted to set up pagination for the datalist control. However when I click next link the next image doesn't display. Then when I click previous the first image is displayed. Did I miss something in the code? [CODE] <table border="0" width="800" bgColor="#ffffff" height="644"> <tbody> <tr bgColor="#ffffff"> <td height="173" colspan="2" bgcolor="#CCCCCC"><table width="796"> <tr> <td width="303"><img src="images/logo.jpg" width="302" height="195" align="left"></td> <td width="497"><center><img src="images/word_bnr.jpg" width="433" height="162"></center></td> </tr> </table></td> </tr> <tr bgColor="#ffffff"> <td height="20" colspan="2" bgcolor="#009900" align="left"> <span class="ex3">-:::You are currently @ the <b>GALLERY </b> section:::-</span> </td> </tr> <tr> <td rowspan="2" width="583"> <center> <table width="569"> <tr> <td height="20" width="561">&nbsp;</td> </tr> <tr> <td align="left"> …

Member Avatar
+0 forum 0

how can I set custom no of records to display in datalist view....tq

Member Avatar
Member Avatar
+0 forum 1

Hello, Any help will be much appreciated. I have created a page tht will show search results on a datalist. this page was running perfectly before the addition of following lines in the page Load and BtnSearch_Click respectively. if (Request.QueryString["query"] != null) { string searchParam = Request.QueryString["query"].ToString(); BindList(searchParam); } .................................... string qryString = Url; //Request.Url.ToString(); qryString += "?query=" + TxtSearch.Text.Trim(); Response.Redirect(qryString); } ................................................ Now the problem is at lstSearch.DataBind();. It gives exception “String Value can not be null. Parameter name:Old value”. I googled the error but most of the ppl who encountered this problem were those who upgraded to newer …

Member Avatar
Member Avatar
+0 forum 1

i have a formview which show the data from a database.. in another page, i have a datalist that also display data from the database.. in the datalist, i have a hyperlink that when click will navigate to the page that have the formview which display data that suppose to match with the data from datalist... the thing is, how do i request it in the formview...

Member Avatar
Member Avatar
+0 forum 1

Hai , I have a gridview containing datalist in it.In the datalist i placed 2 labels. My problem is that the content of the datalist not placed within a gridview row cell. The design and css used is: [CODE] <ItemTemplate> <td> <asp:DataList ID="DlistItem" runat="server" RepeatDirection="Horizontal"> <ItemTemplate> <div class="datalisthead"> <div style="padding-left: 20px; padding-top: 1px;"> <asp:Label ID="LblStaff" runat="server" Text='<%#Bind("Class") %>'></asp:Label> <br /> <asp:Label ID="LblSubject" runat="server" Text='<%#Bind("Subject_Name") %>'></asp:Label> </div> </div> </ItemTemplate> </asp:DataList> </td> </ItemTemplate> [/CODE] [CODE].datalisthead { width:150px; height:auto; border-right:1px; border-right-color:Black; border-right-style:solid; }[/CODE] Thanks in advance, Sreevidya

Member Avatar
Member Avatar
+0 forum 2

hai, I have a datalist that contain image button control and i bind images from folder to it. I need to get image slide show when clicking on an image. How can I implement it. Thanks in advance, sreevidya.

Member Avatar
Member Avatar
+0 forum 3

[CODE]<div style="margin:0px 0px 0px 0px;" class="grid_16 example" align="center"> <asp:DataList ID="DataList1" runat="server" BorderStyle="Groove" CellPadding="5" CellSpacing="5" RepeatColumns="3" RepeatDirection="Horizontal"> <ItemTemplate> <ul> <li> <object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="328" height="200"> <param name="movie" value="vplayer/player.swf" /> <param name="allowfullscreen" value="true" /> <param name="allowscriptaccess" value="always" /> <%--<param name="flashvars" value="file=<%# Eval("vurl","video/swf/{0}") %>&image=<%# Eval("vpurl","video/thumb/{0}") %>" /> --%> <embed type="application/x-shockwave-flash" id="player2" name="player2" src="vplayer/player.swf" width="328" height="200" allowscriptaccess="always" allowfullscreen="true" flashvars="file=<%# Eval("vurl","video/swf/{0}") %>&image=<%# Eval("vpurl","video/thumb/{0}") %>" /> </object> <br /> <asp:Label ID="Label2" runat="server" Text=<%# Eval("vurl","{0}") %>></asp:Label> </li> <asp:Label ID="Label3" runat="server" Text=<%# Eval("uploadedby","Uploaded By:-{0}") %>></asp:Label> </ul> </ItemTemplate> </asp:DataList> </div>[/CODE] [B]VURL=K:\newweb457\newweb\Video\SWF\how.swf[/B] [B]vpurl=K:\newweb457\newweb\Video\Thumb\how.jpg[/B] Am i doing something wrong.The player is not playing video and neither it is displaying any …

Member Avatar
Member Avatar
+0 forum 4

Team - This has to be way more simple that I am getting. Been searching google for hours with no luck. Simply stated, I am trying to delete a datalist row which is bound to a mssql database. Simple right! I am missing where it is putting the key or something because I get getting the error "Object reference not set to an instance of object". I can't figure out how to give it the object! Page code has the datakey: [CODE] <asp:DataList ID="DataList1" runat="server" DataKeyField="cartid" DataSourceID="SqlDataSource1" Width="698px">[/CODE] Code behind has the code from msdn: [CODE] Dim aTable As DataTable …

Member Avatar
Member Avatar
+0 forum 1

Team - I hope you can give me a hand here. I am working on a shopping cart type site which displays products in a datalist. I need to find a way to add up all the products and place that total in a label outside of the datalist. Also, any opinions if I should use a datalist or a repeater control are also welcome! (can't use datagridview). Thank you all for your help. Dewayne

Member Avatar
Member Avatar
+0 forum 1

I needed to use datalist paging for my recent project. I am developing a photo sharing website like Picasa for "mobile phones".. I have named it [B]PicaShare[/B] I searched for a video tutorial on the internet but couldnt find one. So i decided to make one because i think its the best way to learn. I started learning asp.net by watching videos on youtube. After that i learnt the advanced techniques by reading ebooks. I still prefer learning through video because its so easy.. I thought this might be useful to others so im sharing it here Here is the …

Member Avatar
+0 forum 0

Hello All, I have a Collapsible Panel Extender inside a datalist.I have a hyperlink inside the panel within the datalist. I want to have a modal popup on clicking the hyperlink inside the panel and I want the modal pop up to be populated with the data from the navigate URL property of the hyperlink. Is it possible to do this? If yes,please give your suggestions. I am attaching my code,this is currently throwing an exception which I am guessing is because it is unable to find the hyperlink in the panel within the datalist :- [CODE]<asp:ToolkitScriptManager ID="ToolkitScriptManager_CollapsiblePanel" runat="server"> </asp:ToolkitScriptManager> …

Member Avatar
Member Avatar
+0 forum 2

Hai All, i need to display the datalist by Country wise and the City wise.(Asc order). My database have all my store address details. i need to display all stores according to country and city wise of the country. how to display using Datalist. i need to fetch data from sql database. Example Country A store: City Bb store address. . . Store: City Dd store address . . Country B Store City Aa address . . Country D store city Ff is it possible through nested datalist. any help possible here/ Thanks in Advance DoubtTgr

Member Avatar
Member Avatar
+0 forum 1

Hello. I have a nested GridView inside of a DataList. I need to enable the paging control of the GridView, but I have no idea where to put the code for it to work. Also I would like to create a function which will do the following: when a user will click on a specific row on the GridView, he will be redirected for the appropriate page. I tried to find answers using google, but I didn't success to understand the samples that I found. Here is my code: [CODE] using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; …

Member Avatar
+0 forum 0

Hello. I have a nested GridView inside of a DataList. I need to enable the paging control of the GridView, but I have no idea where to put the code for it to work. Also I would like to create a function which will do the following: when a user will click on a specific row on the GridView, he will be redirected for the appropriate page. I tried to find answers using google, but I didn't success to understand the samples that I found. Here is my code: [CODE] using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; …

Member Avatar
+0 forum 0

I am working on a project, its purpose is to search a database and display the results in a data list so they can be used. I have the search working correctly but it only outputs to a data grid. Help please! [CODE] Protected Sub Button2_OnClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click Dim objCommand As OleDbCommand Dim objAdapter As OleDbDataAdapter Dim objDataSet As DataSet Dim strSearch As String Dim objConnection As String = ("Provider=Microsoft.ACE.OLEDB.12.0;" _ & "Data Source=" & Server.MapPath("DB\ScrumManagementSystem.accdb") & ";") Dim cn As New OleDbConnection(objConnection) Dim strSQLQuery As String strSearch = TextBox1.Text If Len(Trim(strSearch)) > …

Member Avatar
Member Avatar
+0 forum 2

Hi all, i had Web Page include [B][U]DataList [/U][/B]control , [B][U]TextBox [/U][/B]and [B][U]Button [/U][/B].. [B]DataList1 [/B]: Getting Data from SQLDB [B]TextBox [/B]: for Editing Selected Field in [B]DataList [/B] [B]Button [/B]: Submit Editing when i Click [B]Button [/B]it Editing Data Succefully in [I]SQLDB [/I], but in same Time [B]DataList [/B]Control[COLOR="Red"] doesn't changed untill i refresh the Page !![/COLOR] [COLOR="Green"]how could i make DataList changing Data or Reloading it after Submit Edit in same Page without need to Refresh the Page .. !! [/COLOR] i Hope u understand me , Sorry for My Weak English :(

Member Avatar
Member Avatar
+0 forum 3

The End.