automatic notification using DL RRS feed

  • Question

  • Hi all,
    i need to create a DL where if a new entry is done it should send a mail automatically to a person..
    So i have created a custom List with the required fields and have created a workflow in sharepoint designer specifying that whenever a new entry is created in that list it should send a mail..That part is done.
    now i need to create a aspx page (feedback for instance) in which there should be a send button on clicking that it should add a entry in that custom list..
    If i can do this everything will be done.
    I just want to know how to create that aspx page?

    Thanks & Regards
    • Edited by Mike Walsh FIN Friday, December 25, 2009 9:07 AM :-) please help asap... deleted. NEVER say in a forum post that you want something asap or urgently. If you are in a hurry don't use forums, ring MS Customer Support Services and PAY for support. Here you wait.
    Friday, December 25, 2009 5:25 AM

All replies

  • You can refer following article to add custom aspx page.

    Friday, December 25, 2009 6:17 AM
  • hi Ani,
    But the problem is that i need to make an aspx page which will ask for for input from the user and on click of a button it will make an entry in the custom list. how is that possible

    Thanks n Regards Sayan
    Friday, December 25, 2009 6:34 AM
  • Hi,
    As I am getting, You need an aspx form which contains some controls for user input and an button to do an entry in your custom list.

    For This you can add server controls like input box, drop-down etc for user input/selection just like an Asp.Net web page.

    May be I am missing some thing??
    Friday, December 25, 2009 8:46 AM
  • if you only want to know how to create the aspx page for adding a new item into your custom list, you can follow the following steps:
    1. create a new solution
    2. create a new aspx page
    3. add sharepoint reference into your solution.(Microsoft.SharePoint.dll and Microsoft.SharePoint.Security.dll.....)
    4. add some required control to collect information for a new list item.
    5. in its CS file, use OM to add the new list item into your custom list.
    SPList list = elevWeb.Lists["Custom list name"];
    SPListItem item = null;
    // new a list item and save.
     item = list.Items.Add();
    setValues(elevWeb, item);//get all field values from your aspx page and set the values for your new item.

    hmmm.... if all users can add new item into your custom list, please add the following code to improve the permission.

    i hope it will can help you!

    Friday, December 25, 2009 9:26 AM
  • hi,
    will this work with the custom list of the sharepoint..how will i be able to map the contents of the form with the columns of the list
    Thanks n Regards Sayan
    Friday, December 25, 2009 10:23 AM
  • You can add item to a custom list by first obtain the reference to your SPList object by using the following code:

    SPList list = web.GetList("/Lists/[LSITNAME] ");

    The GetList method(http://msdn.microsoft.com/en-us/library/lists.lists.getlist.aspx) takes a site-relative path to the list folder or a list form page as an argument. If the list instance is not found, the GetList method will throw an exception of type FileNotFoundException. The only way to check if a list exists without throwing an exception is to enumerate the site object’s lists and check for its existence.

    After you have a reference to an SPList object for the list, you can create a new list item by adding an SPListItem(http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splistitem.aspx) to its Items collection. The SPListItem is a generic item with fields corresponding to the fields in the list. You can create and save a new list item by using the following code:

    SPListItem newItem = list.Items.Add();
    newItem ["Title"] = "Litware Goes Public!";
    newItem ["Body"] = " We all live in exciting times.";
    newItem["Expires"] = DateTime.Now + TimeSpan.FromDays(2);

    The Update method of the SPListItem object commits the changes to the list. If you don’t call the Update method, the list item data will not be saved. The fields (columns) of the list are specified using the display name. They can also be accessed by the GUID identifier of the field or the zero-based index in the Fields collection. If a field is specified that is not in the Fields collection for the list, an ArgumentException will be thrown.

    If you encounter an permission insufficient problem, you need to run your code within SPSecurity.RunWithElevatedPrivileges Method (Microsoft.SharePoint)(http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spsecurity.runwithelevatedprivileges.aspx)
    Cogito, ergo sum. How liberating it would be to live a life free of all the inane courteous formalities which are utterly meaningless, insincere and therefore degrading!
    Monday, December 28, 2009 1:44 AM