Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8467063
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T15:31:57+00:00 2026-06-10T15:31:57+00:00

I am trying to use jquery ui theme (tabs) in aspx. $(function () {

  • 0

I am trying to use jquery ui theme (tabs) in aspx.
$(function () {
$(‘#tabs’).tabs();
});

<form id="form1" runat="server">    
<div id="tabs">
    <ul>
        <li><a href="#tabs-1">tab 1</a></li>
        <li><a href="#tabs-2">tab s2</a></li>
        <li><a href="#tabs-3">tab 3</a></li>
    </ul>
    <div id="tabs-1">
        tab-1
    </div>
    <div id="tabs-2">
        tab-2
    </div>
    <div id="tabs-3">
        Gridview is here
    <asp:Button ID="Button2" runat="server" Height="31px" Text="Button" 
             onclick="Button2_Click" />
    </div>
    </div>
    </form>

now i am calling a function button2_click doing some operation on Gridview but i am getting the error
Control ‘GridView1’ of type ‘GridView’ must be placed inside a form tag with runat=server

protected void Button2_Click(object sender, EventArgs e)
    {
        ExportToExcel(GridView1, "HElloWorld");
    }
    private void ExportToExcel(GridView gv, string filename)
    {
        Response.Clear();
        Response.Buffer = true;
        Response.AddHeader("content-disposition", "attachment;filename=" + filename + ".xls");

        Response.Charset = "";

        Response.ContentType = "application/vnd.ms-excel";

        StringWriter sw = new StringWriter();

        HtmlTextWriter hw = new HtmlTextWriter(sw);


        gv.RenderControl(hw);



        string style = @"<style> .textmode { mso-number-format:\@; } </style>";

        Response.Write(style);
        //Response.Write(GetMessage());
        Response.Output.Write(sw.ToString());
        // Response.Write(GetFooter());
        Response.Flush();

        Response.End();

    }

error is coming at gv.RenderControl(hw);

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T15:31:59+00:00Added an answer on June 10, 2026 at 3:31 pm

    That is because you are missing one div closing tag. put </div> just before </form> and it should work.

    Googling it got me this, just override the method Page.VerifyRenderingInServerForm Method, as follows:

    public override void VerifyRenderingInServerForm(Control control)
    {
    return;
    }

    n thats it. You will be free of that error…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to use the jquery UI tab feature from the link http://jqueryui.com/demos/tabs/manipulation.html
I'm trying to use jQuery UI tabs much like a Master Page in ASP.Net.
I am trying to use jQuery Ajax in my form to submit... Here is
I am trying to use jquery to find a div inside an iframe. Is
I'm trying to use the JQuery UI tabs by pointing one of the tabs
I am trying to use jquery to do an animated scroll from one div
I'm currently trying to use jQuery to fade a particular div which contains a
I'm trying to figure out if there's a way to use jquery's slideDown/slideUp/slideToggle functions
I am need paint my image. I'm trying use JQuery in here this link:
I'm trying to use jquery to detect when the ENTER key is pressed AND

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.