Tuesday, December 25, 2012

A page can have only one server-side Form tag Error

Scenario:-
            I  have an aspx page and inside that I have a button that when the user clicks on that button,  generate the word document og the page.I have written for the button's click function.

Platform: Asp.net,c# and sharepoint

Exception Details:-
               I am able to generate the document but after the page is executed, the following error is displayed.
I am absolutely there is only form within the page because if the implementation of the above function is empty,I do not get any error. The webpage loads fine and clicking the button does nothing.

"A page can have only one server-side Form tag."
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: A page can have only one server-side Form tag.



This kind of error occuered on button click event on page when you are making function call  this.Page.RenderControl(hw);

Just follow the below steps it will defenately resolved this( A page can have only one server-side Form tag.
) exception.


1) create boolean variable like below and make it false.

    private bool test = false;

2) use that variable(test) in button click event and make it true 

    protected void test_click(object sender, EventArgs e)  
       { this.test = true; }

3) Now third imprtant step is to override render method and add your code(previously written in button   click function) in render method.
  
   protected override void Render(HtmlTextWriter writer)   
     {   if (this.test)      {
       //add your code here and remove code from button click function
      }
    }


Friday, September 28, 2012

Design Document For Sharepoint








Design Document
Portfolio             

Title                       Portal Name

Estimation           Hrs


Category              Medium

                                               




Revision History
Version
Date
Prepared / Modified by
Comments
1.0


Draft Version
1.0


Reviewed








Glossary
Abbreviation
Description




OOB
Out-of-box
SPD
SharePoint Designer


TABLE OF CONTENTS

 

1.1.   Overview


Application Name
Portal Name
Change Type
Enhancements/New Development/change Request
SharePoint #
-
Requestor Name

Author

Technical Approver

Approval Date

Expected Release Date




1.2.   Scope

To develop Portal application as per requirement document provided by business user.

1.3.   Reference


Provide Requirement Documents reference here.



2.1.   Development

a)      Servers-
Dev server name
b)      Technology-
C# ASP.NET, MOSS 2007

c)       Tools-
 Visual Studio 2008, SharePoint 2007 Designer.
d)      Dev site-
Dev Site url

2.2.   Production

a)      Servers-
Production server name
b)      Site-
Site url


     



3.1   Requirement Name       22 hrs  

Specifications

 Specification of requirement which is provided in requirement document

Feasibility         

Feasible or not

UI Design

   Provide screen shot how it will look.


Components

a)      Custom Web pages.

Business Logic/Implementation

   Provide business logic here.if it is enhancement provide where you are going to change the code etc.

Deployment

a)      Deploy  .wsp :provide the solution name,user control custom pages or feature etc.

3.2                                            4 hrs   

Specifications


 Feasibility      

UI Design


Components

a)      Edit form.

Business Logic/Implementation


Deployment


3.3                                                                              12 hrs

Specifications



Feasibility       

UI Design



Components

Business Logic/Implementation

Deployment

3.4                                                                                             12 hrs

Specifications


Feasibility       

UI Design


Components :


Business Logic/Implementation :

Deployment


3.5                                                                                  53 hrs

Specifications


Feasibility       

UI Design

Components

Business Logic/Implementation


Deployment


3.6

Specifications

Feasibility       

UI Design


Components

Business Logic/Implementation


Deployment



DESIGN SIGN-OFF
<Name of Client>
<Title>
<Date>
Signature
Title
Date


Chiluka Satish
<Title>
08/02/2012
Signature
Title
Date