.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

how to generate a Serial number dynamically in listview

Posted By:      Posted Date: September 20, 2010    Points: 0   Category :ASP.Net


my listview having 3 columns:SI.No,HallticketNo,Name.

I bind data to listview but the "SI.No" column in listview showing Empty data.

So,how to generate serial number in listview ?

pls tell me very urgent.

Many thanks in advance.

View Complete Post

More Related Resource Links

Dynamically generate a number for email title.


Hi, which part of the code do i modify in alerttemplate.xml to make my email title appear in such  a way that it is:

"Please approve Request 01"

"Please approve Request 02"

"Please approve Request 03"




... and so on


The title which i input is Please approve Request. I want the number to be auto generated and auto increment each time a new email is sent. 


Thanks in advance! :D

dynamically adding sql server columns based on number of files in fileuploader


I want to create a new table to sql database at runtime.  The column names would be "Name", "Date", "Event".  I would also like to have one more column name "Image" but the problem is that since the amount of images will vary, I want the application to count the amount of files in the Multiple fileuploader and then add a image column to the table for the respected amount of files. 

For example if i am uploading 3 files in the multiple fileuploader, the names should be "Name", "Date", "Event", "Image1", "image2", Image3"

I also would like that table name to be name dynamically from the textbox Name when the user enters the information.


I have the following code to make a new table, but I dont know how to name the fields at runtime like previously asked please help!!!


Dim objConn As New SqlConnection("Server=<servername>;uid=<userid>;pwd=<password>;database=master")


How to Generate hash key value dynamically.

How to create a hash key based on the user login? And based on that hash key how create persistent url for that user?i.e picasa album sharing based on one identity key value.Thanks,Suman

Remove a dynamically added ListViewItem from a ListView

Good day, In my xaml I have created a window in my app which contains a  ListView control. I have programmatically added ListViewItems. The ListViewItems each contain a grid. Grid column 0 contains a textblock, Grid column 1 contains a textbox and Grid column 2 contains a button. What I would like to do is click the button in the ListViewItems grid, and remove the ListViewItem in the button is contained from the ListView. Could anyone suggest a way to do this? I would really appreciate any advice, as this is crucial to the feature I am creating.

how to use random generate number with linq

how to use random generate number with linqthanks in Advance:)

how to generate a unique random number on a form submission?


I want to generate a unique random number everytime a user submits a form. As the form is submited the data of the form should be placed in a database and a unique random number should be generated so that the user can later use this unique random number to reterieve his details from the database that refer to his unique random id. The unique random number should be atleast 9 digits long. Please help me on this.

Gridview: How to create a column that will autogenerate the serial number of each row


Hi all,

I have a gridview and I want to autopopulate the serial number columns. For eg, the gridview has 10 rows. The user deleted the first row. I want the gridview serial number to automatically shift down by one. Ie., 10-->9, 9-->8 and so on.

Can this be done? Any help is much appreciated!

Dynamically Generate No of Control(like Label) depend upon database no of item


I have a requirment like 

i required a dynamically generated Control (like Label) depend upon Database no of item


  If i fetch Database text (like Name) fieldd 3 time than i am intrested to generate  label 3 time

for (int i=0;i<table.row.count;i++)


label label[i]=table.row[i][0].Tostring();


How can do the above because label[i] is not allowed

Khurram Shahzad

SSIS 2005 - Dynamically generate create table statement from source



I have a requirement where i had to migrate the table structure and data from ODBC database to SQL Server. I have dynamic source reader that uses sql query from variable to get the data and the next step is to get the create statement and create table and then to insert data. how can i get Create Statement the destination produces and use sql task to create the table and then insert the data using data flow task.

Please suggest



Dynamically generate image on image map or image button


Here is this thing which to me looks possible, but when I searched over
the net I couldnt find anything. Any ideas about this please do let me know.

I want to create a page where I can upload an image using any upload
function and then display it.
Now after diplaying it I want to select the hotspots for an image map.
The coordinates of image map values are stored in a database.

Basically I want that to create image maps and hotspots I dont use any
offline software, this work is successfully completed and working perfectly, but i want generate one identification where i click the hot spots position in image or CSS file Generate for user identifications, So how can i solve this problem,please Help me.

I hope You are clear in that what I am looking for.

Please do reply if you have any sugestions.

Thanks In Advance:



Dynamically Generate hotspots With one identification like image or CSS in Image map


Hi One And All,

              Here I am write one query please help to me.

Query:how to Dynamically Generate Hotspots On image map with identification like image or CSS this logic for admin side ,and this image is Display in Front end side with Hotspots  using asp.net and c#.

I hope this understand one and all,

Thanks In Advance.

Financial application serial number


We have developed a financial solution. This solution is a web based asp.net using C#. we use oracle as database. 10+ user use the solution from different location. In this solution we need some serial number like sales entry. In each sales entry make a sequential serial number like 1,2,3.Currently we use oracle sequencer to maintain the serial number. In our code we get the sequence number from oracle database then insert the sales information in the database. But the problem is if there is any error in insert the insert method is role back and the sequence is missed. At the end of the day we get some of the number is not present in the database. Like if there is 1000 sales in the day, sequence goes to 1003. We need such a solution that solves my problem. Please help us.


How to Create a dynamically specified number of Tasks


Hi ,

how can i Create a dynamically specified number of Tasks in Sharepoint workflow ?

and Marking the Workflow “Complete” when the majority of those Tasks have been marked “Complete”

please advice



Generate a dynamic number of custom report item instances in a report


Are there any solid examples/tutorials/demos of how to dynamically generate custom report item instances in a report based on the amount of rows in a data set?

Additionally I would like to insert these custom report items in a particular order based on a field in the data set.

Any help/pointers/articles would be appreciated!

columns and rows of grid generate dynamically



i am developing the applicaton, from which i have a grid and that grid i want to use for the insert data,

i have a page default.aspx page, in this i have a dropdownlist, according to selection of the dropdownlist, grid's cols and rows created dynamically in insert.aspx. so in page load of the insert.aspx the grid will automatically have that much of cols and rows and that all cell contain the textbox.

how can i set that dynamically....

please help me....

thanks in advance

waiting for the reply.....

Create GridView Dynamically with any Number


according to my case i want to show from  1 to 7 gridviews at every query from database
so i made 7 methods and also 7 gridview ,but this is bad idea
how can i ceate it dynamically for only gridview and only method?
thanks so much
here is my gridview
<asp:GridView ShowHeader="False" ID="gv_statistics_gr4" runat="server" AutoGenerateColumns="False" onrowdatabound="gv_statistics_gr4_RowDataBound" > <RowStyle BackColor="#FFFF00" /> <Columns> <asp:TemplateField HeaderText="name"> <ItemTemplate> <asp:Label ID="img_vvvitemname10" runat="server" Text='<%#Eval("name")%>' /> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="count "> <ItemTemplate> <asp:Label ID="lbl_sum" runat="server" Text='<%#Eval("count") %>' /> </ItemTemplate>

Change color (dynamically) according to increasing value(number)


Hello, I have a question on how to go about a really simple problem.


Imagine you have a label with some random text like "$25000". Which is databound to a double value for example: Price.

Now what I want is that the color of that label, the Foreground, changes very slightly more red when Price is incremented with like 1.  So I want 25002 slighty redder than 25001. How do you calculate a color based on a double value, or how do you make a Converter for this?


I have no idea where to start

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend