.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

Document set - GenerateDocumentID method gets called twice

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


I have implemented a custom document ID provider and it works fine. But for document set, the GenerateDocumentId method gets called twice.

Am i doing wrong something here or it is like this by design?



View Complete Post

More Related Resource Links

OnPreRender method is Not called last because of objectDataSource

I have an Asp.net web form with several drop down list boxes on it. The way the code is currently set up is that the drop down listboxes are populated through use of an ObjectDataSource via a class named SpottedWeb, as referred to by the TypeName attribute. The problem is that sometimes I need to pre-select drop down list box items, but the ObjectDataSource seems to have the last say in loading the drop down listboxes. So any attempt to pre-select drop down listbox items is undone when my .Aspx code is executed. My attempt to fix this involved creating an OnPreRender method, because I thought it would have the last say with populating my listboxes. But this is not the case.So is there a way that I can have the OnPreRender method or some other C# method be called after the .Aspx page loads my drop downs with the objectDataSource? // Here is my OnPreRender method.         protected override void OnPreRender(EventArgs e)        {            base.OnPreRender(e);             if (Session["Indicator"] != null)            {                PrePopulateWebForm(); // Pre-Sele

Best method for authentication with an external WCF service called from a Silverlight 4 Web Part ins

If we have a Silverlight 4 application which gets its data from an external WCF service and is deployed as a Web Part on in SharePoint 2010 what is the best method to perform authentication in the WCF service itself.  The service is not on the same domain as the SharePoint server but any user authenticated by the SharePoint server (and only those users) should be able to access the service.  Since the Silverlight application is calling the service the WCF service itself must be configured to use BasicHttpBinding which, of course, severely limits possible authentication methods.

WebBrowser.Document.ExecCommand(..) causing input method to change


I am making an IM client, and I've used the Forms WebBrowser control as a WYSIWYG-like editor. Unfortunately I also have to support alternative input methods, like Japanese and it's causing me grief.

To clear the editor after sending a message I call the following on myWebBrowser control:

myWebBrowser.Document.Body.InnerHtml = "";
myWebBrowser.Document.ExecCommand("FontName", false, _selectedFont);
myWebBrowser.Document.ExecCommand("FontSize", false, _selectedSize);

This works for English languages, but for Japanese this causes the input method to change from hiragana back to English characters. 

Does anyone know how I can set the font without breaking the set input method?



Web method called from JavaScript not returning correct type


Hello all-

I have a web method written in VB.Net, coded as follows:

<OperationContract()> _
        Public Function HowManyExportsLeft(ByVal userId As Integer) As Boolean
            _UserId = userId
            Dim MaxExports As Integer = Me.UserSettings.ExportSettings.ExcelExportSettings.MaximumNumberOfExports
            Dim MyExports As Integer = Me.UserSettings.ExportSettings.ExcelExportSettings.MyExportCount
            Dim returnValue As Integer
            If MaxExports = Integer.MaxValue Then
                returnValue = 999
                returnValue = MaxExports - MyExports
            End If
            Return returnValue
        End Function

Now, on the ClientClick method of an asp:Button, I call the following method :

function CheckExportsRemaining() {
    var hdnUserId = $get(CalcResults.Controls.hdnUserId);
    Services.Common.HowManyExportsLeft(hdnUserId.value, ExportCount_complete);

Which of course on success calls this callback method:

function ExportCount_complete(result) {
    if (result <= 3) {
        eACommonDialog.ShowDialog(getURLString(aspxSiteUrl, 'TrialExports.aspx?exportsRemaining=' + result), 420, 215, '', 75, false, true, '', false

Missing method called in VB.NET by means of Interop

Hi All,
I've developed a program to automate the execution of some other programs through their visual interfaces.
I've used the functions of User32.dll, Sendmessage, PostMessage, GetMenuItemID, etc, etc.
The program runs successfully on several machines, but not on some others with the same (apparently) OS equipment and configuration which report GetMenuItemID (and any of the above functions) as missing method.
I can't imagine where is the trick.
Any help will be appreciated.

Document Maping of SSRS Not Showing when using the Render method of the Java SOAP API



I am using the Render method of the Java SOAP API to get the report from SSRS server. For some of the report which have docmap on report server, I cann't get the docmap in my page, even I already set the DocMap property of DeviceInfo to true. Others properties of DeviceInfo are as below:

    docMap = "True";
    hTMLFragment = "True"; 
    section = "1"; 
    toolbar = "False"; 
    zoom = "100";

Anyone can help to advice on this issue? many thanks.

Thanks & Regards,
Danny She

Working with SharePoint document libraries

Document libraries are collections of files that you can share with team members on a Web based on Microsoft Windows SharePoint Services. For example, you can create a library of common documents for a project, and team members can use their Web browsers to find the files, read them, and make comments. Users with Microsoft Office 2003 can check out and edit the files as if they resided on a local or network drive.

By default, your team Web site comes with a built-in document library named Shared Documents, which is listed on the Quick Launch bar as well as on the Documents and Lists page.

Thinking about new C# method prototypes: object as dictionary

I recently had to write a small Flickr API. I know many .Net API for Flickr already exist but I needed one for a Silverlight application. Whatever, it's only about building some querystrings so I did it by myself. It's been an opportunity to think again about a classical question: how to pass parameters to a method ?

Imagine you have a generic method to call some Flickr functions.

jQuery $(document).ready() and ASP.NET Ajax asynchronous postback

Many call it the ASP.NET jQuery postback problem, but using the technique below should make it no problem anymore. $(document).ready() isn't called after an asynchronous postback. What this means? You lose the functionality that should be executed within $(document).ready() after an UpdatePanel rendered its contents after an asynchronous postback.

SharePoint Document Workspaces for Developers

Office 2003 is being released this month, and a cast of supporting applications is already available. One of these is Windows SharePoint Services 2.0, the free team add-on for Windows Server 2003. If you're not familiar with SharePoint Services basics, take a look at What Developers Need to Know About Windows SharePoint Services. In this article, I'm going to drill into one key place where SharePoint and Office 2003 overlap: document workspaces

Upload a File to a SharePoint Document Library - Part I

The following helper class demonstrates a few techniques that allow documents to be uploaded to a SharePoint document library programmatically without using the API or a custom web service. You don't need to specify a document library name, and it will create any folders specified in the URL as required. File meta data will be updated if any properties are passed.

SharePoint document migration challenges when migrating files and folders

There are several challenges when migrating documents to Microsoft SharePoint. While these challenges can be overcome, they are a real pain if the migration source, content and file systems are not SharePoint friendly.

Sys.Net.WebServiceFailedException: The server method '' failed with the following error:



Let's say we have 2 time consuming functions, aaa and aaa1 inside a aspx page.

        public static string aaa(int i)
            return i.ToString();

        public static string aaa1(int i)
            return i.ToString();



        <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
        <span id="displayspan"></span>
        <br />
        <input type="button" value=

Jscript error: Object does not support property or method


 Hi, i have little knowledge on javascript but i need to use this code get from somewhere for a jquery to work.

I face this "Jscript runtime error: Object does not support property or method" whenever im trying to run this page.

In my experience, im get this error msg 9 out of 10 times i use javascript in my system.

Im using Microsoft Visual web developer 2008, i wonder if this is related to my problem, i not sure there is anything i need to add as reference or update anything.

But anyway, in short, i just couldn't use javascript code when using this development tool because of this sort of error.

Anyway, it happen that last time i tried use the same type of jquery code in another project and it seems to work well without an error.

But now when im try to use it again in this recent project i created, it come out with this error and i have no idea how to solve it even look through google and this forum.

It doesn't really seems like its the code problem itself although im not sure, because any javascript code just couldn't work.

So below is my code that i need to use.

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" ></script>
<script type="text/javascript" src=&quo

Using CreateNewUserWizard SendingMail method to email me, not applicatnt.


I have staff area of my site I am protecting with forms authentication using c# and .Net 4.0. What I want to do is let the staff members register on the site but instead of the confermation email being sent to them I want it sent to me so I can go in and approve it. I have been trying to use the SendingMail method  but can not figure out how to get it to email me instead of the person that registered. I have searched around this site and find many topics on the SendingMail method but none seem to properly address my issue. Can anyone help me out?

Charset Problem with dynamically generated Word Document


in my asp.net web application i am dynamically generating a word documnet out of a sql data. I have set the char set UTF-8 during the doument creation in code but still when i open the generated document and check it char set .. it is always windows-1252 not the one that i have set. My sql data in the document have special characters whihc can only be understandable using the UTF-8 charset otherwise its always ?T written in place of an apostrophy . Pasting my code here..

         HttpContext.Current.Response.ContentType = "application/msword";
         HttpContext.Current.Response.ContentEncoding = System.Text.UnicodeEncoding.UTF8;
         HttpContext.Current.Response.Charset = "utf-8";
         string strFileName = "Details" + ".doc";
        HttpContext.Current.Response.AddHeader("Content-Disposition", "inline;filename=" + strFileName);
        StringBuilder strHTMLContent = new StringBuilder();
        string strMessage = " ";
        DataView abstractview = (DataView)dsAbstract.Select(DataSourceSelectArguments.Empty);
        foreach (DataRowView row1 in abstractview)
            strMessage += "<table border='1' cellspacing='0' cellpadding='5' width

Embed word document inside excel



I am using ASP.NET and C# 2.0 and working on web application.

I want to embed a word document inside a excel sheet.

How to embed word document inside excel.

Thank you



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