Solved

Sharepoint template galley

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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

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…
In case you ever have to remove a faulty web part from a page , add the following to the end of the page url ?contents=1
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

717 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