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
Solved

Sharepoint template galley

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

There is one common problem that all we SharePoint developers share: custom solution deployment. This topic can't be covered fully in this short article, so all I want to do in this one is to review it from a development-to-operations perspectiv…
Pimping Sharepoint 2007 without Server-Side Code Part 1 One of my biggest frustrations with Sharepoint 2007 in the corporate world is that while good-intentioned managers lock down the more interesting capabilities of Sharepoint programming in…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

839 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