You must Sign In to post a response.
  • Category: ASP.NET

    How to View word and pdf documents in a html blank

    am developing a project for job seekers.

    so all candidates upload their resume.

    As a admin having a link called View Resume.If admin click the View Resume link the student which is depend the link should be open blank page and the resume need to be display.

    i am trying to done this task, when i am click View CV button it throw a error message like
    Server Error;
    Control 'ctl00_ContentPlaceHolder1_grd' of type 'GridView' must be placed inside a form tag with runat=server.
    if anyone know help me or refer any other useful links to i am solve this error and done the task.

    Thanking you,
  • #763625

    Hi PaulRaj,

    If you are calling gridview Rendercontrol at runtime then that server control was rendered outside of form tag, so that only it's giving this error, to avoid this error I request you to override VerifyRenderingInServerForm.

    public override void VerifyRenderingInServerForm(Control control)


    If you still have any questions please let me know.

    Give respect to your work, Instead of trying to impress your boss.

    Blog :

  • #763636

    Hi Paul raj.S .

    Place your controls inside the form tag and for the controls you should mention runat="server" like below.


    <asp: ContentPlaceHolder id="ctl00_ContentPlaceHolder1_grd
    " runat="server" />


    Sridhar Thota.
    Editor: DNS Forum.

  • #763643

    Hai Paul raj.S,
    The error clearly says "Control 'ctl00_ContentPlaceHolder1_grd' of type 'GridView' must be placed inside a form tag with runat=server."
    It means you have not kept the grid control inside the form tag. You need to check that your master page and content page are rendered correctly.
    Hope it will be helpful to you.

    Pawan Awasthi(DNS MVM)
    +91 8123489140 (whatsApp), +60 14365 1476(Malaysia)

  • #763861
    If you use control without or outside form tag it will throw the error. Whenever you use any control always put it inside a form tag with runat="server" attribute.
    If you are unable to do something properly for the first time, call it Version 1.0!

    Thanks & Regards,

  • Sign In to post your comments