Solved

Sharepoint template galley

Posted on 2010-09-02
5
388 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
  • 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Work Over Net is a new and very powerful collaboration product. With its new easy interface it is becoming very competitive to other similar products like webex and office interactive. WON 2010 have the standard business tools needed for multi-offic…
When installing SharePoint 2010 RTM I came across a strange error, I was getting timeouts during the installation. I searched the web and found the best solution to be found here (http://social.msdn.microsoft.com/Forums/en-US/sharepoint2010genera…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

805 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