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

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

Auto generate file name?

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

Hi all

The name of my form is auto generated at submit, but I need to add a counter at the end to it. I.e. "File name 1", "File name 2"... "File name 40".  
The File name I get from a column in a SharePoint list,  and I need to get that counter value from a field in a SharePoint list as well. My problem is that I can not get the field nr value to increment when forms are created.

I have googled a lot, and found that people use Count() and Max() functions to count the rows in their libraries, and then increment the number, but I need to get that value from a SharePoint list field. If the administrator changes the field value to 40, the next document name will be "File name 41".

Any ideas how that can be acheived?


View Complete Post

More Related Resource Links

.Net 4 - Generate dump file, improved debuging

Hi, For the system we are developing, we need to be able to generate a crash dump file in case things go bad. The application is being implemented using .Net 4 C# WPF. In the past (.Net 3.5) we were using a number of methods from the "dbghelp.dll" and "kernel32.dll" unmanaged dlls in order to generate a crash dump and WinDbg in order to investigate it. I was wondering if .Net 4 (and Visual Studio 2010) brought anything that would help us stay away from unmanaged code and make the dump file investigation easier (especially when multithreading operations are involved). Any suggestions and links would be appreciated. Thank you for your time, Cristian

generate file

Hi, i want to generate a word file in a particular pre defined format ( if i can refer to some template) and some of the data in that format will be populated dynamically. Can anyone help me with possible ways.

How to generate report from RPL file


I have Integrated my Reporting service 2008 R2 with Sharepoint foundation 2010. I have created few reports. For one of the report I have setup a subscription. Type of subscription set is RPL Renderer.

Once this subscription was executed, I can see RPL file in my Sharepoint document library. Now the question is what to do with this RPL file. How can I generate Report from this RPL file.

I checked that Neither Report viewer control nor Report builder accepts this RPL file.

I also could not find much help over RPL renderer on Internet.

How to auto create (or Generate a script) which can create indexes on subscriber


In our scenario, subscriber and publishers have same tables and we want the indexes also to be same at all places..

How to auto create (or Generate a script) which can create indexes on subscriber which are already added on publisher.. Is there a auto way or is there any article somewhere which can help..


IMP : There might be a delay in posting replies due to time difference (GMT +2:00) and Friday's Holiday instead of Sunday.

Could not generate configuration file error



I am trying to create an xml configuration file for a very simple SSIS package, but I get an error "Could not generate configuration file."

While creating the config file using the Package configuration wizard, I do get an error saying "The properties tree could not be initialized" for one of the steps. I am sure this is somehow related to not being able to create the config file. The package was created on test server 01 and then copied to test server 02. When trying to create a new configuration file, I am getting this above error. I searched others who had similar questions. I am not using any user variables that store objects either. I am just storing the connection strings in the xml file.

Can someone please help?

Thank you


Technical Details


Could not complete wizard actions. (Microsoft Visual Studio)


Could not generate the configuration file. (Microsoft.DataTransformationServices.Wizards)

For help, click:

Auto generate No. Problem !!!!



I am facing a problem .i think someone must solved it.actually I developing a college project. There are a DueCollection page in which one of the column is challan No.Challan No is unique and Auto Generate.

Problem is  in Challan No.suppose 5 user are working in same page then one Challan No is generate and save in database which is a serious problem for me.

What I do,I have a textbox which I generate a maximum challan no from database.suppose maximum challno is 100 and when 5 user are open the same page 100 is show to 5 user and suppose one user is save one record  then  it should be convert 101 to 4 user but it not be.100 is save 5 times in database. I can't  found any solution .the biggest problem is Challno Textbox  is visible.user must see .

How can I manage the same?please someone help me.



remove stack trace , Additional Info, from log file


i am using belowcode in web.config 

<loggingConfiguration name="" tracingEnabled="true" defaultCategory="General">
      <add name="Rolling Flat File Trace Listener" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" fileName=".\Logs\jeejix_error.log" footer="------------Error End----------------------------" formatter="Text Formatter" header="---------Error Start-------------------------------" rollFileExistsBehavior="Increment" rollInterval="Day" rollSizeKB="50" />
      <add type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken

Why visual studio does not generate .vb file when, publishing project into normal directory other th



I am using visual studio 2005,

When I publish my asp.net project into C:\Documents and Settings\temp\example, then it publish successfully,but into  C:\Documents and Settings\temp\example location , I dont see default.aspx.vb file. I do see Bin directory, PrecompiledApp.config file, webconfig file.

I am not sure , why it does not generate default.aspx.vb file (may be instead it is created PrecompiledApp.config file)

or is this because I am not publishing file into virtual directory.

Give me some advice on this.

Thank you


DataBase error - An attempt to attach an auto-named database for file ...


I m trying to save files like pdf, word, excel etc... into sql express, but m getting this error in my web page:

 An attempt to attach an auto-named database for file C:\Users\malek.safa\Documents\test vb\SavingFileInDB\SavingFileInDB\App_Data\aspnetdb.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.


 m not getting errors inside my code, just this one appearing on the web page. any idea? thanks

How to connect text file data to native SharePoint lists with auto update?


I have to pull external data from a text file to a SharePoint list on a daily base. Additional column content (e.g. attachments) in SharePoint should be kept during update. There should be RSS feeds, email notifications or workflows on external data change (so delete all items and import new will not work).

I've found this codeless 3rd party solution with automatic background update (and write-back???):

Any other idea? BDC-based? Thanks.

Thanks, SharePointFrank http://www.layer2.de/en/products/

Report Manager - Stop auto generate



I have a report with 4 different variables await user input, these variable can be null but the problem I am having is since null is set to the default value for all of the variables the report will automatically generate itself when the user starts it.

Is there a way to halt auto generation so the user just sees the variables and the view report button other than setting one of the variables to not have a default value of null?


How to auto-generate object initzializer code according to any given class definition?



I think this is at least somewhat connected to reflection so I posted it here.

I work with WCF and Web Services right now. Of course I use the tools provided to generate code from the WSDL documents, hence, for every datatype, a corresponding class is generated. As the WS has loads of types with nested subtypes, I get about 80 usually small classes, only having a few members. In order to implement all that, I have to initialize the classes over and over again.

So I wonder, if there is no way, to use reflection to automatically generate  code (object inizializer) from the class definition, including all subclasses?

Ideal would be a snipped - so that I just enter the name of any random class and dynamically get the full initializer generated. Do snippets actually have the power to do that?

As this will save a lot of stupid typing, I also wonder, if there aren't already any tools, snippets or widgets that do this? I assumed that is is something many programmers might need, but google did not show anything like it.

Thank you very much!

Auto generate page level event handlers?


Inside VS2010 is there a way of auto generating page level event handler code? 

Generate XSD file from Class



If anyone knows a link to some documentation regarding generating xsd file from a class (the same as xsd.exe does), ie: how it works, what it uses, the concept / relation behind this conversion. I've tried to search the web and all i was pointed to was xsd.exe tool which doesn't work for my dll/class.


new line to field name in rdl file to generate a report


Hey i want to generate a report and so while designing the rdl file i want to place some label in the same column name to display ex:

employee details - COLUMN NAME


full name

address etc

all these 3 fields should come under the column name "employees".

my question is - i need the code to place these sub labels in new lin

How to generate XML from XSD file in VS2010?


Hi all,

Right now, I am working on my prj with VS2010 C# and ArcGIS silverlight API2.0. I have got some data stored in collection and I want to write these data into XML.

I am a rookie here, so maybe my questions are stupid...

I have the xsd file which I think defines the schema of the XML file. So I should first generate the resource codes of the classes that I want from the xsd file and then use these classes to write the data into XML files. Am I thinking in a right way? If not, are they other suggestions?

If I am right, another stupid question....how can I generate classes from this xsd file in VS2010. I searched, I found something called xsd.exe, through this, a cs file can be generate from xsd file. But I dont know where I can find it....

Thank you very much!!

How to design an rdl file to generate a report.


hi im new can any one tell me How to design an rdl file to generate a report.

any code help any link would be really helpful


i have tables n triggers created.

i use sql server  2005.




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