Recently I face a strange issue. I created a new web application. And when I navigate to any page I got below Error:
Sorry, this site hasn't been shared with you.
When I look into this I found my URL was bit strange. It was routed trough /_layouts/15/start.aspx page which causes me Access Denied and my URL looks like below:
siteurl/_layouts/15/AccessDenied.aspx?Source=http%3A%2F%2Fserver%3A40164%2F_layouts%2F15%2Fstart%2Easpx#//_layouts/15/viewlsts.aspx
Solution:
I found that this is occured due to a feature "Minimal Download Strategy". you can find this feature at
Site Settings > Manage Site Features > Minimal Download Strategy.
Original source: More Info
Wednesday, 28 October 2015
Tuesday, 27 October 2015
Error occurred in deployment step 'Activate Features': A timeout has occurred.
This is a common error I face while deploying.
Error occurred in deployment step 'Activate Features': A timeout has occurred.
Generally My approach is I select "No Activation " in Active Deployment Configuration Setting of solution.
But here is an alternative solution that you can try out:
Solution: Add the executionTimeout value
Program Files\Common Files\Microsoft Shared\Web server extensions\12\TEMPLATE\LAYOUTS
Existing code
<location path="upload.aspx">
<system.web>
<httpRuntime maxRequestLength="2097151" />
</system.web>
</location>
Replacement code
<location path="upload.aspx">
<system.web>
<httpRuntime executionTimeout="999999" maxRequestLength="2097151" />
</system.web>
</location>
C:\Inetpub\wwwroot\wss\VirtualDirectories\VirtualDirectoryFolder
<httpRuntime maxRequestLength="51200" />
Replacement line
<httpRuntime executionTimeout="999999" maxRequestLength="51200" />
Error occurred in deployment step 'Activate Features': A timeout has occurred.
Generally My approach is I select "No Activation " in Active Deployment Configuration Setting of solution.
But here is an alternative solution that you can try out:
Solution: Add the executionTimeout value
- Open the Web.config file in Notepad.
- Note By default, this file is in the following location:
Program Files\Common Files\Microsoft Shared\Web server extensions\12\TEMPLATE\LAYOUTS
- Add the executionTimeout value that you want.
Existing code
<location path="upload.aspx">
<system.web>
<httpRuntime maxRequestLength="2097151" />
</system.web>
</location>
Replacement code
<location path="upload.aspx">
<system.web>
<httpRuntime executionTimeout="999999" maxRequestLength="2097151" />
</system.web>
</location>
- Click File, and then click Save.
- Open the web application Web.config file in Notepad.
- Note By default, this file is in the following folder:
C:\Inetpub\wwwroot\wss\VirtualDirectories\VirtualDirectoryFolder
- Change the following line in the file.
<httpRuntime maxRequestLength="51200" />
Replacement line
<httpRuntime executionTimeout="999999" maxRequestLength="51200" />
- Click File, and then click Save.
- Exit Notepad.
- Do a IISRESET.
Friday, 23 October 2015
Pass function Parameter & string value in string builder function.
Recently I was working with dynamic controls where I got in to a small issue where I need to provide parameters in JavaScript function. I tried lots of things , But here is the approach which solved my issue:
Example:
sb.AppendLine(@"<li><a href='#' onclick='FunctionTest(" + "\"" + string1 + "\" ,\"" + string2+ "\"," + int1 + ")'>" + string4 + "</a></li>");
Explanation:
We can divide above code in following parts:
1) sb.AppendLine(@"<li><a href='#' onclick='FunctionTest(" completes first string
2) + "\"" + string1 + "\" Adds " string1 " (string parameter) to function
3) " + int1 + " Adds int1 (integer parameter) to function
4) )'>" + string4 + "</a></li>"); Complete remaining string
Example:
sb.AppendLine(@"<li><a href='#' onclick='FunctionTest(" + "\"" + string1 + "\" ,\"" + string2+ "\"," + int1 + ")'>" + string4 + "</a></li>");
Explanation:
We can divide above code in following parts:
1) sb.AppendLine(@"<li><a href='#' onclick='FunctionTest(" completes first string
2) + "\"" + string1 + "\" Adds " string1 " (string parameter) to function
3) " + int1 + " Adds int1 (integer parameter) to function
4) )'>" + string4 + "</a></li>"); Complete remaining string
Monday, 12 October 2015
Missing "Sign in as Different User" option in SharePoint 2013
If you are missing "Sign in as Different User" option in SharePoint 2013, here are few solutions:
Temporary Solutions:
1)Change the siteurl with yours and it will ask you for the new username and password
http://siteurl/_layouts/closeConnection.aspx?loginasanotheruser=true
Keep in mind first option may not work in some browsers and ie10
2) Open internet explorer by using "run as different user" option (Shift+ right click) by entering the username and password that you like
Permanent Fix:
1) Open welcome.ascx file. Below is the path of file:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\CONTROLTEMPLATES\welcome.ascx
2) Put this code in welcome.ascx page
<SharePoint:MenuItemTemplate runat="server" ID="ID_LoginAsDifferentUser"
Text="<%$Resources:wss,personalactions_loginasdifferentuser%>"
Description="<%$Resources:wss,personalactions_loginasdifferentuserdescription%>"
MenuGroupId="100" Sequence="100" UseShortId="true" />
Temporary Solutions:
1)Change the siteurl with yours and it will ask you for the new username and password
http://siteurl/_layouts/closeConnection.aspx?loginasanotheruser=true
Keep in mind first option may not work in some browsers and ie10
2) Open internet explorer by using "run as different user" option (Shift+ right click) by entering the username and password that you like
1) Open welcome.ascx file. Below is the path of file:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\CONTROLTEMPLATES\welcome.ascx
2) Put this code in welcome.ascx page
<SharePoint:MenuItemTemplate runat="server" ID="ID_LoginAsDifferentUser"
Text="<%$Resources:wss,personalactions_loginasdifferentuser%>"
Description="<%$Resources:wss,personalactions_loginasdifferentuserdescription%>"
MenuGroupId="100" Sequence="100" UseShortId="true" />
Thursday, 8 October 2015
Script Block control Error
I was creating a materpage when I got following error on publishing my masterpage:
CS0030: Cannot convert type "Microsoft.SharePoint.Webcontrols.Scriptblock" to "System.Web.UI.IAttributeAccessor".
The solution of this error was hidden in warning of debug.When I check the content of my masterpage I found some extra properties added to ScriptBlock tag. My tag looked like below:
<SharePoint:ScriptBlock runat="server" __designer:Preview="<script
type="text/javascript">// <![CDATA[
var g_Workspace = "s4-workspace"; // ]]>
</script>" __designer:Values="<P N='ID' T='ctl09' /><P
N='Page' ID='1' /><P N='TemplateControl'
ID='2' /><P N='AppRelativeTemplateSourceDirectory' R='-
1' />"></SharePoint:ScriptBlock>
I make it simple like below and my page was working like a charm.
<SharePoint:ScriptBlock ID="ScriptBlock2" runat="server" ></SharePoint:ScriptBlock>
CS0030: Cannot convert type "Microsoft.SharePoint.Webcontrols.Scriptblock" to "System.Web.UI.IAttributeAccessor".
The solution of this error was hidden in warning of debug.When I check the content of my masterpage I found some extra properties added to ScriptBlock tag. My tag looked like below:
<SharePoint:ScriptBlock runat="server" __designer:Preview="<script
type="text/javascript">// <![CDATA[
var g_Workspace = "s4-workspace"; // ]]>
</script>" __designer:Values="<P N='ID' T='ctl09' /><P
N='Page' ID='1' /><P N='TemplateControl'
ID='2' /><P N='AppRelativeTemplateSourceDirectory' R='-
1' />"></SharePoint:ScriptBlock>
I make it simple like below and my page was working like a charm.
<SharePoint:ScriptBlock ID="ScriptBlock2" runat="server" ></SharePoint:ScriptBlock>
I was working on a user control when I was encountered with below error:
The Page allows a limit of 11 dependency, and that limit has been exceeded.
Here is the solution for this issue:
1) Go to IIS manager.Choose your site, right-click and select explore.
2) You will find web.config file when you explore your site.Take backup of web.config file
3) Modify web.config as below.
- Find DirectFileDependencies in web.config
- Set DirectFileDependencies="20"
- Save the file.
4) Refresh the page.
Country Table SQL Script
Recently I was asked to create three tables of country, state and city of world. I thought this data will be useful to every one. Here is my script for Country table. I will add others soon...
CREATE TABLE [dbo].[Country](
[ID] [int] IDENTITY(1,1) NOT NULL,
[CountryName] [nvarchar](100) NOT NULL
) ON [PRIMARY]
GO
SET IDENTITY_INSERT [dbo].[Country] Off
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Afghanistan')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Albania')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Algeria')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'American Samoa')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Andorra')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Angola')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Anguilla')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Antarctica')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Antigua And Barbuda')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Argentina')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Armenia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Aruba')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Australia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Austria')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Azerbaijan')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Bahamas')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Bahrain')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Bangladesh')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Barbados')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Belarus')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Belgium')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Belize')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Benin')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Bermuda')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Bhutan')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Bolivia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Bosnia And Herzegowina')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Botswana')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Bouvet Island')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Brazil')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'British Indian Ocean Territory')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Brunei Darussalam')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Bulgaria')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Burkina Faso')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Burundi')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Cambodia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Cameroon')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Canada')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Cape Verde')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Cayman Islands')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Central African Republic')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Chad')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Chile')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'China')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Christmas Island')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Cocos (Keeling) Islands')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Colombia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Comoros')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Congo')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Cook Islands')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Costa Rica')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Cote D''Ivoire')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Croatia (Local Name: Hrvatska)')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Cuba')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Cyprus')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Czech Republic')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Denmark')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Djibouti')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Dominica')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Dominican Republic')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'East Timor')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Ecuador')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Egypt')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'El Salvador')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Equatorial Guinea')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Eritrea')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Estonia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Ethiopia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Falkland Islands (Malvinas)')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Faroe Islands')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Fiji')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Finland')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'France')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'French Guiana')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'French Polynesia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'French Southern Territories')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Gabon')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Gambia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Georgia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Germany')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Ghana')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Gibraltar')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Greece')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Greenland')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Grenada')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Guadeloupe')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Guam')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Guatemala')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Guinea')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Guinea-Bissau')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Guyana')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Haiti')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Heard And Mc Donald Islands')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Holy See (Vatican City State)')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Honduras')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Hong Kong')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Hungary')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Iceland')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'India')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Indonesia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Iran (Islamic Republic Of)')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Iraq')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Ireland')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Israel')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Italy')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Jamaica')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Japan')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Jordan')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Kazakhstan')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Kenya')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Kiribati')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Korea, Dem People''S Republic')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Korea, Republic Of')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Kuwait')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Kyrgyzstan')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Lao People''S Dem Republic')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Latvia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Lebanon')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Lesotho')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Liberia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Libyan Arab Jamahiriya')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Liechtenstein')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Lithuania')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Luxembourg')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Macau')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Macedonia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Madagascar')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Malawi')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Malaysia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Maldives')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Mali')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Malta')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Marshall Islands')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Martinique')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Mauritania')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Mauritius')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Mayotte')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Mexico')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Micronesia, Federated States')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Moldova, Republic Of')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Monaco')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Mongolia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Montserrat')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Morocco')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Mozambique')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Myanmar')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Namibia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Nauru')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Nepal')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Netherlands')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Netherlands Ant Illes')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'New Caledonia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'New Zealand')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Nicaragua')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Niger')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Nigeria')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Niue')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Norfolk Island')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Northern Mariana Islands')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Norway')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Oman')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Pakistan')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Palau')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Panama')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Papua New Guinea')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Paraguay')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Peru')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Philippines')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Pitcairn')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Poland')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Portugal')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Puerto Rico')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Qatar')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Reunion')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Romania')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Russian Federation')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Rwanda')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Saint K Itts And Nevis')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Saint Lucia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Saint Vincent, The Grenadines')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Samoa')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'San Marino')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Sao Tome And Principe')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Saudi Arabia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Senegal')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Seychelles')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Sierra Leone')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Singapore')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Slovakia (Slovak Republic)')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Slovenia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Solomon Islands')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Somalia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'South Africa')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'South Georgia , S Sandwich Is.')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Spain')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Sri Lanka')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'St. Helena')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'St. Pierre And Miquelon')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Sudan')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Suriname')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Svalbard, Jan Mayen Islands')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Sw Aziland')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Sweden')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Switzerland')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Syrian Arab Republic')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Taiwan')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Tajikistan')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Tanzania, United Republic Of')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Thailand')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Togo')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Tokelau')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Tonga')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Trinidad And Tobago')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Tunisia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Turkey')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Turkmenistan')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Turks And Caicos Islands')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Tuvalu')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Uganda')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Ukraine')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'United Arab Emirates')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'United Kingdom')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'United States')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'United States Minor Is.')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Uruguay')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Uzbekistan')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Vanuatu')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Venezuela')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Viet Nam')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Virgin Islands (British)')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Virgin Islands (U.S.)')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Wallis And Futuna Islands')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Western Sahara')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Yemen')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Yugoslavia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Zaire')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Zambia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Zimbabwe')
GO
SET IDENTITY_INSERT [dbo].[Country] OFF
GO
CREATE TABLE [dbo].[Country](
[ID] [int] IDENTITY(1,1) NOT NULL,
[CountryName] [nvarchar](100) NOT NULL
) ON [PRIMARY]
GO
SET IDENTITY_INSERT [dbo].[Country] Off
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Afghanistan')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Albania')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Algeria')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'American Samoa')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Andorra')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Angola')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Anguilla')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Antarctica')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Antigua And Barbuda')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Argentina')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Armenia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Aruba')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Australia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Austria')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Azerbaijan')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Bahamas')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Bahrain')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Bangladesh')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Barbados')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Belarus')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Belgium')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Belize')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Benin')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Bermuda')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Bhutan')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Bolivia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Bosnia And Herzegowina')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Botswana')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Bouvet Island')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Brazil')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'British Indian Ocean Territory')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Brunei Darussalam')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Bulgaria')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Burkina Faso')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Burundi')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Cambodia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Cameroon')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Canada')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Cape Verde')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Cayman Islands')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Central African Republic')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Chad')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Chile')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'China')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Christmas Island')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Cocos (Keeling) Islands')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Colombia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Comoros')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Congo')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Cook Islands')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Costa Rica')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Cote D''Ivoire')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Croatia (Local Name: Hrvatska)')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Cuba')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Cyprus')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Czech Republic')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Denmark')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Djibouti')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Dominica')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Dominican Republic')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'East Timor')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Ecuador')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Egypt')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'El Salvador')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Equatorial Guinea')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Eritrea')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Estonia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Ethiopia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Falkland Islands (Malvinas)')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Faroe Islands')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Fiji')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Finland')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'France')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'French Guiana')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'French Polynesia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'French Southern Territories')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Gabon')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Gambia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Georgia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Germany')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Ghana')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Gibraltar')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Greece')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Greenland')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Grenada')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Guadeloupe')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Guam')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Guatemala')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Guinea')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Guinea-Bissau')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Guyana')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Haiti')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Heard And Mc Donald Islands')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Holy See (Vatican City State)')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Honduras')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Hong Kong')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Hungary')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Iceland')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'India')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Indonesia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Iran (Islamic Republic Of)')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Iraq')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Ireland')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Israel')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Italy')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Jamaica')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Japan')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Jordan')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Kazakhstan')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Kenya')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Kiribati')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Korea, Dem People''S Republic')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Korea, Republic Of')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Kuwait')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Kyrgyzstan')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Lao People''S Dem Republic')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Latvia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Lebanon')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Lesotho')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Liberia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Libyan Arab Jamahiriya')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Liechtenstein')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Lithuania')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Luxembourg')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Macau')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Macedonia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Madagascar')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Malawi')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Malaysia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Maldives')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Mali')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Malta')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Marshall Islands')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Martinique')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Mauritania')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Mauritius')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Mayotte')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Mexico')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Micronesia, Federated States')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Moldova, Republic Of')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Monaco')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Mongolia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Montserrat')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Morocco')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Mozambique')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Myanmar')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Namibia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Nauru')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Nepal')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Netherlands')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Netherlands Ant Illes')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'New Caledonia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'New Zealand')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Nicaragua')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Niger')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Nigeria')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Niue')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Norfolk Island')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Northern Mariana Islands')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Norway')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Oman')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Pakistan')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Palau')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Panama')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Papua New Guinea')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Paraguay')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Peru')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Philippines')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Pitcairn')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Poland')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Portugal')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Puerto Rico')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Qatar')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Reunion')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Romania')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Russian Federation')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Rwanda')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Saint K Itts And Nevis')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Saint Lucia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Saint Vincent, The Grenadines')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Samoa')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'San Marino')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Sao Tome And Principe')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Saudi Arabia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Senegal')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Seychelles')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Sierra Leone')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Singapore')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Slovakia (Slovak Republic)')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Slovenia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Solomon Islands')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Somalia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'South Africa')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'South Georgia , S Sandwich Is.')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Spain')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Sri Lanka')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'St. Helena')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'St. Pierre And Miquelon')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Sudan')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Suriname')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Svalbard, Jan Mayen Islands')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Sw Aziland')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Sweden')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Switzerland')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Syrian Arab Republic')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Taiwan')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Tajikistan')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Tanzania, United Republic Of')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Thailand')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Togo')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Tokelau')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Tonga')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Trinidad And Tobago')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Tunisia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Turkey')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Turkmenistan')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Turks And Caicos Islands')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Tuvalu')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Uganda')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Ukraine')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'United Arab Emirates')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'United Kingdom')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'United States')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'United States Minor Is.')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Uruguay')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Uzbekistan')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Vanuatu')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Venezuela')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Viet Nam')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Virgin Islands (British)')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Virgin Islands (U.S.)')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Wallis And Futuna Islands')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Western Sahara')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Yemen')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Yugoslavia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Zaire')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Zambia')
GO
INSERT [dbo].[Country] ([CountryName]) VALUES (N'Zimbabwe')
GO
SET IDENTITY_INSERT [dbo].[Country] OFF
GO
Thursday, 3 September 2015
Find element using jQuery.
If you want to find html element using jquery this post can be helpful.
$("input[id*='ElementID']")
$("input[id^='ElementID']")
$("input[id$='ElementID']")
$("input[id!='ElementID']")
$("input[id~='ElementID']")
$("input[id|='ElementID']")
- If you're finding by Contains then it'll be like this
$("input[id*='ElementID']")
- If you're finding by Starts With then it'll be like this
$("input[id^='ElementID']")
- If you're finding by Ends With then it'll be like this
$("input[id$='ElementID']")
- If you want to select elements which id is not a given string
$("input[id!='ElementID']")
- If you want to select elements which id contains a given word, delimited by spaces
$("input[id~='ElementID']")
- If you want to select elements which id is equal to a given string or starting with that string followed by a hyphen
$("input[id|='ElementID']")
Friday, 31 July 2015
Responsive Design
Increase of portable device usage requiring dynamic design changes for static site. Currently I have faced some issue with such concept. My requirement was to display a table on a page and make it look dynamic.
Here are some methods that I used to do it.
1) Using pure CSS :
You need to use media queries to make content dynamic. here is my code sample:
// for device Apple iPhone 5 or less, Samsung Galaxy S3 mini or less and Microsoft Lumia phones
@media (max-width: 320px) {
#docsTable{
max-width:320px;
}
}
// for device Apple iPhone 6,LG G3,LG Optimus G,Samsung Galaxy Note 2,Samsung Galaxy S3- S5,Samsung Galaxy Nexus
@media (max-width: 480px) {
#docsTable{
max-width:480px;
}
}
//for Apple iPad series
@media (max-width: 768px) {
#docsTable{
max-width:768px;
}
}
For other device width information click here.
But the problem occurs when the device has slightly smaller or larger width. It displays scroll which is not user friendly. Here is a way to handle such thing:
2) using Javascript
In this method we calculate the width by device's width and add width css to control at display time.
<script type="text/javascript">
$(document).ready(function() {
// run test on initial page load
checkSize();
// run test on resize of the window in browser. Also need for screen rotation.
$(window).resize(checkSize);
});
//Function to the css rule
function checkSize(){
if(window.innerWidth < 768)
{
var thisObject = $("#docsTable");
var actualWidth = window.innerWidth - 50;
thisObject.css("max-width",actualWidth+"px");
}
});
}
</script>
Monday, 6 July 2015
Display Other site collection List data in current site collection using Client object modal.
A very bad dream in SharePoint 2013 is to "Display Other site collection List data in current site collection" as SharePoint Designer 2013 has deprecated data view web part and content search web part does not give look and feel as we wanted. It might be simple but I will update my self and this blog if I get success in near future with it.
Here is the sample code to display data from other site collection:
1) You need to add a web part page. Add a "Content Editor Web part " in this page. In this paste below code with your changes.
<div>
<!-- Table -->
<table id="docsTable">
<thead>
<tr>
<th>ID</th>
<th>Title</th>
<th>Modified</th>
</tr>
</thead>
</table>
</div>
<script language="javascript" type="text/javascript">
$(document).ready()
{
var folderUrl = document.getElementById('folderpath').value;
var url =document.getElementById('sitepath').value +"/_api/Web/GetFolderByServerRelativeUrl('" + folderUrl + "')?$expand=Folders,Files";
// Get Folders and Files in single call. You can try using ajax call too. I have tried it but I was forced to call method multiple time.
$.getJSON(url,function(data,status,xhr){
// Get Folders
for(var i = 0; i < data.Folders.length;i++){
$('<tr>').append(
$('<td>').html("data.Folders[i].ID"), // Append ID
$('<td>').html("<a href='"+data.Folders[i].ServerRelativeUrl+"' target='_blank'>"+data.Folders[i].Name+"</a>"), // Apend Name. Click redirect to specific Item
$('<td>').text(data.Folders[i].TimeLastModified.substring(0, 10))).appendTo('#docsTable'); //Append modified date.
}
// Get Files
for(var i = 0; i < data.Files.length;i++){
$('<tr>').append(
$('<td>').html("data.Files[i].ID"), // Append ID
$('<td>').html("<a href='"+data.Files[i].ServerRelativeUrl+"' target='_blank'>"+data.Files[i].Name+"</a>"), // Apend Name. Click redirect to specific Item
$('<td>').text(data.Files[i].TimeLastModified.substring(0, 10))).appendTo('#docsTable');//Append modified date.
}
})
}
This is a sample code. You can Add some more functionality like paging, sorting or can change fields as per your need.
Here is the sample code to display data from other site collection:
1) You need to add a web part page. Add a "Content Editor Web part " in this page. In this paste below code with your changes.
<div>
<!-- Table -->
<table id="docsTable">
<thead>
<tr>
<th>ID</th>
<th>Title</th>
<th>Modified</th>
</tr>
</thead>
</table>
</div>
<script language="javascript" type="text/javascript">
$(document).ready()
{
var folderUrl = document.getElementById('folderpath').value;
var url =document.getElementById('sitepath').value +"/_api/Web/GetFolderByServerRelativeUrl('" + folderUrl + "')?$expand=Folders,Files";
// Get Folders and Files in single call. You can try using ajax call too. I have tried it but I was forced to call method multiple time.
$.getJSON(url,function(data,status,xhr){
// Get Folders
for(var i = 0; i < data.Folders.length;i++){
$('<tr>').append(
$('<td>').html("data.Folders[i].ID"), // Append ID
$('<td>').html("<a href='"+data.Folders[i].ServerRelativeUrl+"' target='_blank'>"+data.Folders[i].Name+"</a>"), // Apend Name. Click redirect to specific Item
$('<td>').text(data.Folders[i].TimeLastModified.substring(0, 10))).appendTo('#docsTable'); //Append modified date.
}
// Get Files
for(var i = 0; i < data.Files.length;i++){
$('<tr>').append(
$('<td>').html("data.Files[i].ID"), // Append ID
$('<td>').html("<a href='"+data.Files[i].ServerRelativeUrl+"' target='_blank'>"+data.Files[i].Name+"</a>"), // Apend Name. Click redirect to specific Item
$('<td>').text(data.Files[i].TimeLastModified.substring(0, 10))).appendTo('#docsTable');//Append modified date.
}
})
}
This is a sample code. You can Add some more functionality like paging, sorting or can change fields as per your need.
Subscribe to:
Posts (Atom)
SharePoint Classic Site Retirement: Your Plan to Avoid Last-Minute Chaos
Classic SharePoint has been on borrowed time for years. Microsoft has now put dates on the remaining pieces. Microsoft will disable creation...
-
In last blog we learn how can we enable footer on SharePoint Online Modern Communication site. If you have not gone through that you can use...
-
If you're managing SharePoint Online environments, there's a significant change on the horizon that you need to prepare for. Microso...
-
Issue : Recently, we had a requirement to sync the calendar between shared mailbox outlook and SharePoint Calendar list. We have created 2 f...

