SPSecurity.RunWithElevatedPrivileges(delegate() {
oWeb.AllowUnsafeUpdates = true; SPList oList = oWeb.Lists[sRequestList]; SPListItem oVoucher = oList.GetItemById(Convert.ToInt32(Request.QueryString["RequestNo"])); oVoucher.Delete();
oList.Update(); oWeb.AllowUnsafeUpdates = false;
});
Saturday, 25 April 2015
Delete list item programmatically by id
Greetings everyone,
I go by the name Chanchal Wankhade, and I've been actively engaged in various back-end technologies for over 15 years, specializing in SQL, Oracle, Teradata, MySQL, as well as reporting tools such as Business Objects (BO) and the ETL tool BusinessObjects Data Services (BODS).
In my journey, I've authored informative books on SQL, Oracle, and Teradata, including titles like "PL/SQL FOR ALL," "PL/SQL ONE STOP REFERENCE," "TERADATA BASIC UTILITIES," and "START-UP GUIDE FOR ORACLE DAB'S."
Additionally, I've ventured into the realm of Mutual Funds and authored a book titled "Mutual Funds For All."
These books, namely "PL/SQL FOR ALL," "PL/SQL ONE STOP REFERENCE," "TERADATA BASIC UTILITIES," "START-UP GUIDE FOR ORACLE DAB'S," and "Mutual Funds For All," are available for free download on Google Books. What sets these books apart is the incorporation of real-life examples, followed by syntax explanations and actual use cases.
Feel free to explore and benefit from these valuable resources.
Best regards,
Chanchal Wankhade
Save file in local drive
try {
SPSecurity.RunWithElevatedPrivileges(delegate() { oFile = @"filepath"; byte[] binFile = oFile.OpenBinary(); string path = @"D:\Library\"; if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } string tepmPath = path + oFile.Name; if (File.Exists(tepmPath)) { File.Delete(tepmPath); } using (FileStream fs = File.Create(tepmPath)) { fs.Write(binFile, 0, binFile.Length); fs.Close(); } }); }
catch (Exception ex)
{
//exception handleing here
}
Greetings everyone,
I go by the name Chanchal Wankhade, and I've been actively engaged in various back-end technologies for over 15 years, specializing in SQL, Oracle, Teradata, MySQL, as well as reporting tools such as Business Objects (BO) and the ETL tool BusinessObjects Data Services (BODS).
In my journey, I've authored informative books on SQL, Oracle, and Teradata, including titles like "PL/SQL FOR ALL," "PL/SQL ONE STOP REFERENCE," "TERADATA BASIC UTILITIES," and "START-UP GUIDE FOR ORACLE DAB'S."
Additionally, I've ventured into the realm of Mutual Funds and authored a book titled "Mutual Funds For All."
These books, namely "PL/SQL FOR ALL," "PL/SQL ONE STOP REFERENCE," "TERADATA BASIC UTILITIES," "START-UP GUIDE FOR ORACLE DAB'S," and "Mutual Funds For All," are available for free download on Google Books. What sets these books apart is the incorporation of real-life examples, followed by syntax explanations and actual use cases.
Feel free to explore and benefit from these valuable resources.
Best regards,
Chanchal Wankhade
To check file extensions while uploading
javascript:
var validFilesTypes = ["xls", "xlsx"]; function CheckExtension(file) { /*global document: false */ var filePath = file.value; var ext = filePath.substring(filePath.lastIndexOf('.') + 1).toLowerCase(); var isValidFile = false; for (var i = 0; i < validFilesTypes.length; i++) { if (ext == validFilesTypes[i]) { isValidFile = true; break; } } if (!isValidFile) { file.value = null; alert("Invalid File. Valid extensions are:\n\n" + validFilesTypes.join(", ")); file.value=""; } return isValidFile; }
aspx page:
<asp:FileUpload ID="fuFile" runat="server" onchange="return CheckExtension(this);" />
Greetings everyone,
I go by the name Chanchal Wankhade, and I've been actively engaged in various back-end technologies for over 15 years, specializing in SQL, Oracle, Teradata, MySQL, as well as reporting tools such as Business Objects (BO) and the ETL tool BusinessObjects Data Services (BODS).
In my journey, I've authored informative books on SQL, Oracle, and Teradata, including titles like "PL/SQL FOR ALL," "PL/SQL ONE STOP REFERENCE," "TERADATA BASIC UTILITIES," and "START-UP GUIDE FOR ORACLE DAB'S."
Additionally, I've ventured into the realm of Mutual Funds and authored a book titled "Mutual Funds For All."
These books, namely "PL/SQL FOR ALL," "PL/SQL ONE STOP REFERENCE," "TERADATA BASIC UTILITIES," "START-UP GUIDE FOR ORACLE DAB'S," and "Mutual Funds For All," are available for free download on Google Books. What sets these books apart is the incorporation of real-life examples, followed by syntax explanations and actual use cases.
Feel free to explore and benefit from these valuable resources.
Best regards,
Chanchal Wankhade
SharePoint 2010 Usage at Glance
Greetings everyone,
I go by the name Chanchal Wankhade, and I've been actively engaged in various back-end technologies for over 15 years, specializing in SQL, Oracle, Teradata, MySQL, as well as reporting tools such as Business Objects (BO) and the ETL tool BusinessObjects Data Services (BODS).
In my journey, I've authored informative books on SQL, Oracle, and Teradata, including titles like "PL/SQL FOR ALL," "PL/SQL ONE STOP REFERENCE," "TERADATA BASIC UTILITIES," and "START-UP GUIDE FOR ORACLE DAB'S."
Additionally, I've ventured into the realm of Mutual Funds and authored a book titled "Mutual Funds For All."
These books, namely "PL/SQL FOR ALL," "PL/SQL ONE STOP REFERENCE," "TERADATA BASIC UTILITIES," "START-UP GUIDE FOR ORACLE DAB'S," and "Mutual Funds For All," are available for free download on Google Books. What sets these books apart is the incorporation of real-life examples, followed by syntax explanations and actual use cases.
Feel free to explore and benefit from these valuable resources.
Best regards,
Chanchal Wankhade
Friday, 24 April 2015
Tata Words
Greetings everyone,
I go by the name Chanchal Wankhade, and I've been actively engaged in various back-end technologies for over 15 years, specializing in SQL, Oracle, Teradata, MySQL, as well as reporting tools such as Business Objects (BO) and the ETL tool BusinessObjects Data Services (BODS).
In my journey, I've authored informative books on SQL, Oracle, and Teradata, including titles like "PL/SQL FOR ALL," "PL/SQL ONE STOP REFERENCE," "TERADATA BASIC UTILITIES," and "START-UP GUIDE FOR ORACLE DAB'S."
Additionally, I've ventured into the realm of Mutual Funds and authored a book titled "Mutual Funds For All."
These books, namely "PL/SQL FOR ALL," "PL/SQL ONE STOP REFERENCE," "TERADATA BASIC UTILITIES," "START-UP GUIDE FOR ORACLE DAB'S," and "Mutual Funds For All," are available for free download on Google Books. What sets these books apart is the incorporation of real-life examples, followed by syntax explanations and actual use cases.
Feel free to explore and benefit from these valuable resources.
Best regards,
Chanchal Wankhade