Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Sharepoint template galley

Posted on 2010-09-02
5
Medium Priority
?
419 Views
Last Modified: 2012-05-10
I have wrote event handler for site creation ,user will raise site request , concern person will approve the request ,once request is approved site get created .

For these process i used team site template sts01...but my requirement is when user is creating  request by creating Item in List that time he should able to select site template from list field , in list field sharepoint all site template should get populated to select so when approver is approving the request site will create by that particular template  


can someone hepl me or guide me .Thanks.
0
Comment
Question by:sandipkharde
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
5 Comments
 
LVL 3

Expert Comment

by:ukiran
ID: 33590205
Another alternative is to use a workflow to achieve, what I'm understanding to be, an interface to select a site template.
Coding an event handler could be a solution if you didn't have the requirement to prompt the user for an action.  
0
 
LVL 8

Author Comment

by:sandipkharde
ID: 33593984
thing is that when request is coming to approval that time aprover should able to project template site as per project ?

can you pls  collaborat how can i do this things with workflow or eventhandler?
0
 
LVL 8

Accepted Solution

by:
sandipkharde earned 0 total points
ID: 33607223
Hi ,

I managed by following code, only thing is when i am adding anu custom template  i have to add that template title in choice field of list.

Thnaks.sandip
//Create a Subsite
                            string ParentUrl = properties.ListItem.Web.Url;
                            SPSite ositecollection = new SPSite(ParentUrl);
                            SPWeb mysite = ositecollection.OpenWeb();

                            string siteTitle = properties.ListItem.Title;
                            string siteUrl = ParentUrl + "/" + siteTitle;
                            string siteDescription = "Test";
                            string sitetemplate = sTemplate + ".stp";
                            SPWeb newWeb = mysite.Webs.Add(siteTitle, siteTitle, siteDescription, 1033, sitetemplate, true, false);
                            newWeb.AllowUnsafeUpdates = true;
                            newWeb.BreakRoleInheritance(false)

Open in new window

0
 
LVL 8

Author Comment

by:sandipkharde
ID: 33607231
second thing when you are uploading custom template that custome template should be with .stp extn,
0
 
LVL 8

Author Comment

by:sandipkharde
ID: 33607232
second thing when you are uploading custom template that custom template should be with .stp extn,
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SharePoint Designer 2010 has tools and commands to do everything that can be done with web parts in the browser, and then some – except uploading a web part straight into a page that is edited in SPD. So, can it be done? Scenario For a recent pr…
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question