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

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Dynamically generate a number for email title.

Posted By:      Posted Date: October 21, 2010    Points: 0   Category :SharePoint

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

View Complete Post

More Related Resource Links

how to generate a Serial number dynamically in listview



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.

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

how to use random generate number with linq

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

I need a for to submit to SQL DB then generate and email report.

Hi Everyone,   I am new to the forums as well as new to asp.net as well as most programming languages.  I am needing to develope a page for a website where customers can fill in a form on the page and click submit.  I would like the form data to be inserted into a fresh brand new SQL DB.  I then want the data from each customer to be turned into some sort of file (ie PDF or just a form) and emailed to a specific user as the user hits the submit button to submit their information.   Is there an easy way to do this or is this something that should be handled by a few different methods or software or languages?  Any and all scenerios and information is greatly appreciated!   Thank you,   Wesley Sothard

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.

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.

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



How to generate an excel and send it as email attachment in SSIS 2005 Script Task Component?


I am using a "Script Task" component. I am trying with following three simple steps:

1) Obtain the excel content in HTML

Dim reportInHtml As String = GenerateHTMLReport()

2) Generate an excel with below code:

Dim message As MailMessage

message = New MailMessage(fromAddress, toAddress, subject, String.Empty)

Using memoryStream As MemoryStream = New MemoryStream()

        Dim contentAsBytes As Byte() = Encoding.UTF8.GetBytes(reportInHtml)
        memoryStream.Write(contentAsBytes, 0, contentAsBytes.Length)
        memoryStream.Seek(0, SeekOrigin.Begin)

        Dim contentType As ContentType = New ContentType()
        contentType.MediaType = "application/ms-excel"
        contentType.Name = "Excel_Report.xls"

        Dim excelAttachment

Trying to generate dynamic link to a document within approval workflow email message


In the out of the box approval workflow, the fields below are used to dynamically create a link within the email for a user to access the item/document to be reviewed:


Review [%TaskProcess:Item Title%].[%Variable: InternetLink%]

If I create an approval workflow and modify the text around what comes out of the box, the link works.  If I add those exact fields (period and space included) via the "Add or Change Lookup" box (field selector), it doesn't work. It displays the title as a link but without a document extension of XML (for Infopath form for instance).


I don't want to have to delete my workflow and recreate it just to get that link to work.

Any ideas on why the "[%TaskProcess:Item Title%].[%Variable: InternetLink%]" only works when it is created out of the box versus building the string manually ?

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