Hello. I wanna export my page created from SP designer to Visual studio. Please read all my steps, cause i already heard so many solutions that didn't worked. I will post images below.
This is my final goal:
Steps:
1) I've created two lists in visual studio and deployed them successfully.
http://s17.postimg.org/v3i0n9i8f/listai.jpg
http://s18.postimg.org/3z6bbid21/listai_SP.jpg
2) Then I've created a web part page (info.aspx) with Sharepoint Designer in Site Pages folder.
http://s16.postimg.org/9ttui1w11/puslapis_Designeryje.png
3) Then I went to Visual studio -> new project -> empty sharepoint 2013 project (deploy as farm) -> add new item -> module (modulis). On "Modulis" I press "add new item" -> text file (rename to info.aspx)
http://s14.postimg.org/64k7wqlu9/naujasaspx.jpg
4) I edit Modulis file called elements.xml to this
<?xml version="1.0" encoding="utf-8"?><Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <Module Name="Modulis" Url="SitePages"> <File Path="Modulis\info.aspx" Url="info.aspx" /> </Module></Elements>
5) Before i deploy my solution, I back to Sharepoint Designer and press Preview in browser on info.aspx.
http://s21.postimg.org/e302yu3iv/vaizdas.jpg
6) I press edit page-> add a web part -> and choose "Gauti dokumentai" (1st list); and "Išsiųsti dokumentai" (2nd list) in same way.
7) edit page -> add a web part -> media and content -> content editor -> add; On content editor i press -> edit web part -> Content link "DocSuvestine.js" -> press test link (working) -> ok. Here is my result. (two different lists in two pages and everything in page).
http://s8.postimg.org/wjnngnvlh/Untitled.jpg
8) Then i back to SP designer. Press refresh. My file is still here. Now i press on info.aspx ->edit file in advanced mode-> copy everything -> go back to Visual studio -> Molulis -> info.aspx and paste -> save. -> delete info.aspx from Sharepoint designer -> back to Visual studio and finally i deploy this:
http://s23.postimg.org/vvtwv7h0r/image.jpg
9) I back to Sharepoint Designer -> refresh -> and i see my deployed page in site pages. I press preview in browser info.aspx and I get this.
http://s17.postimg.org/5v28qpjm7/image.png
Any ideas? Anybody know how to fix this or make all I did in easier way?