.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Server Side Validation for SharePoint 2007 Form Fields

Posted By:      Posted Date: September 24, 2010    Points: 0   Category :SharePoint

Hi Guys,

Need to validate NewForm.aspx and EditForm.aspx of SharePoint custom list. My current implementation is by using JavaScript. It's working fine.

Someone suggested JavaScript is not a good approach.I am unable to fetch ids dynamically by JavaScript only for few fields (people picker, calendar control) and in that case i have hard coded the ids. hardcoding is always a bad approache.

Is there any way to validate those mentioned form at server side? Is it really good way to think that my validation can put inside Event Handler?

thanksArup MCTS - SharePoint

Play Sudoku

View Complete Post

More Related Resource Links

Importing SharePoint List Data into Project Server 2007 Custom Fields

Learn how to use the programmability features of Project Server 2007 and Windows SharePoint Services 3.0 to import SharePoint list data into an enterprise custom field.

validation of fields in document library in sharepoint 2007


i have a secenario like ,when the user uploads an document in sharepoint 2007 document library he need to enter the metadata or values for the fields in edit form.aspx .Now if there is say FieldX which is a chioce field(Drop down list) ,if the user select option
"YES" then FieldY which is a simpletextfield should be mandatory ,if the user selects Option "NO" then FieldY should be non-mandatory.can u pls provide the solution at the earliest

Thanks in advance



Client side validation while "OK" button clicked in list in sharepoint 2007


Hi All,

while saving data to a list in sharepoint all the validation are server side ,can i do it client side in sharepoint 2007

Thanks and Regards Er.Pradipta Nayak

Accessing SharePoint 2010 Data with Server-Side APIs

Accessing SharePoint data in server-side solutions is one of the most common tasks that you will perform as a SharePoint developer. SharePoint 2010 provides powerful server-side APIs that enable you to retrieve, add, edit, and delete SharePoint data programmatically. SharePoint 2010 also includes the new LINQ to SharePoint technology that enables you to work with SharePoint data efficiently and easily.

Server side validation of Fileupload control not working



I've tried this method in my code behind to try and validate that the Fileupload control has a file or not. I get the error message the the event "Server Validate" cannot be found. Can anyone tell why? Thanks.

Public Sub CustomValidator1_ServerValidate(ByVal source As Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs) Handles CustomValidator1.ServerValidate

' Get file name

        Dim uploadAvatar As FileUpload = DirectCast(AdvertisementForm.FindControl("uploadAvatar"), FileUpload)

        Dim UploadFileName As String = uploadAvatar.PostedFile.FileName

        If UploadFileName = "" Then
            ' There is no file selected
            args.IsValid = False
            Dim Extension As String = UploadFileName.Substring(UploadFileName.L

Office Services: Merging Word Documents on the Server Side with SharePoint 2010


Office 2010 and SharePoint 2010 include a new set of components called Application Services. These put a rich set of tools in a developer's bag for Office automation. We'll show you how to use Office OpenXML, Word Automation Services and SharePoint to build a simple application that merges separate status reports into a single document.

Manvir Singh, Ankush Bhatia

MSDN Magazine July 2010

Basic Instincts: Server-Side Generation of Word 2007 Docs


This month, Office Open XML, which allows ASP.NET and SharePoint developers to read, write, and generate Word, Excel, and PowerPoint documents on the server without running an Office desktop application there.

Ted Pattison

MSDN Magazine November 2006

How to set rule only on form validation success InfoPath 2007



I'm a newbie to InfoPath 2007. I am creating a from without code. Is there a way to set a Rule to the Submit Button which will be triggered only in the case of Form validation success ? can we make use of the "Set condition" to setup a expression  in the Rule, for this purpose. Still i have no idea how to come up with an expression for such purpose. Can someone please explain.

Deploying custom Web Parts on SharePoint 2007 production server

I would like to develop a custom SharePoint 2007 Web Part for a client. Currently I'm using Visual Studio to deploy my solution to a test environment (since it's a SharePoint Project I choose just Build -> Deploy from the menu). What are the appropriate steps to deploy it to the production server?

I'd like keep it simple and safe (i.e. use the principle of least privilege). Therefore (if possible) avoid using stsadm, achieve this through web interface, or avoid using administrative rights.

Also, can I specify the scope of my Web Part, i.e. choose on which Web Application or Site Collection will it be installed?

sharepoint 2007 server needs to be restarted twice a day???



our sharepoint server needs to be restarted twice a day now - always around 9.30am and 14.30pm.  this has only started in the last 2 weeks.  its working along fine then all of a sudden it goes to a dead page.

i have spent the last week trying to identify what it is.  i have set the logging to verbose and put plenty of the messages in there into google but can not see anything relevant.  the event viewer shows nothing.

i have sp2 installed but no cumalitve updates.  i am wary of installing these at the mo and wreaking the whole thing.  if noone has any suggestions ill install them.  ill list soem details about the problem below. 

it doesnt happen on weekends so it must have something to do with users using the system so im thinking something to do with the database (SQL Server 2000).  NB users dont use our sp2007 on weekends. 
if i restart iis, the layout of the page comes back but some of the webparts are dead so that doesnt work. 
if i resart sql server, that doesnt work either. 
there is plenty of room on drives and the task manager is at 20-30% when i check it when the site is down.
only a server resart seems to work.

there are just so many messages in the sp logs that i cant identify what it could be.  is there any other loggi

OpenSearch Descriptor File Generator for SharePoint Server 2007 Sites

Learn about the OpenSearch Location Builder Tool, which you can use to create an OpenSearch Description (.osdx) file to connect SharePoint Server 2007 sites to the Windows Client via the OpenSearch protocol.

OpenSearch Location Builder Tool for SharePoint Server 2007

Download the tool and start using it to create an OpenSearch Description (.osdx) file to connect SharePoint Server 2007 sites to the Windows Client via the OpenSearch protocol.

Interacting with the Excel Web Services API for SharePoint Server 2007

Get a quick start with the Excel Web Services API, which enables interaction with published Excel 2007 workbooks in SharePoint Server 2007 from a remote application. Learn considerations around session state, security, and performance.

Customizing the Content Query Web Part in SharePoint Server 2007

Walk through how to customize the Content Query Web Part in SharePoint Server 2007 to query content across multiple sites in a site collection and display the results in any way that XSL can support. Learn how to get similar results when customizing the CQWP does not meet your needs.

Search Customization and Development Options in SharePoint Server 2007

Examine the powerful platform of SharePoint Server 2007 search for the end user and developer. Learn about the built-in Web Parts for search and writing search queries for your applications.

Administrator and Developer Guide to Code Access Security in SharePoint Server 2007

Explore configuration options, get best practices for managing CAS in SharePoint environments, and walk through a complex CAS scenario.

Creating List Definitions with Custom List Columns for SharePoint Server 2007

Learn to use Visual Studio 2008 Extensions for Windows SharePoint Services to create a SharePoint list definition that implements custom list columns.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend