Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/77.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/29.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 一个页面只能有一个服务器端表单标记。错误_Html_Asp.net_Xmlworker_Xmlworkerhelper - Fatal编程技术网

Html 一个页面只能有一个服务器端表单标记。错误

Html 一个页面只能有一个服务器端表单标记。错误,html,asp.net,xmlworker,xmlworkerhelper,Html,Asp.net,Xmlworker,Xmlworkerhelper,更新上传()方法 当页面嵌入到母版页中并且该页面还具有表单标记时,通常会发生这种情况。很难说,因为我对项目结构没有概念。但这里有一些提示。既然您说您没有附加任何母版页,请检查该页是否设置为附加到任何_Layout.aspx或任何其他版面页。在MVC中,当您创建页面时,可以选择在布局页面中为页面添加广告 作为解决方法,我建议您从页面中删除现有的表单标记,并查看页面的呈现方式。当页面嵌入母版页且该页面也有表单标记时,通常会发生这种情况。很难说,因为我对项目结构没有概念。但这里有一些提示。既然您说您没

更新上传()方法


当页面嵌入到母版页中并且该页面还具有表单标记时,通常会发生这种情况。很难说,因为我对项目结构没有概念。但这里有一些提示。既然您说您没有附加任何母版页,请检查该页是否设置为附加到任何_Layout.aspx或任何其他版面页。在MVC中,当您创建页面时,可以选择在布局页面中为页面添加广告


作为解决方法,我建议您从页面中删除现有的表单标记,并查看页面的呈现方式。

当页面嵌入母版页且该页面也有表单标记时,通常会发生这种情况。很难说,因为我对项目结构没有概念。但这里有一些提示。既然您说您没有附加任何母版页,请检查该页是否设置为附加到任何_Layout.aspx或任何其他版面页。在MVC中,当您创建页面时,可以选择在布局页面中为页面添加广告


作为解决方法,我建议您从页面中删除现有的表单标记,并查看页面的呈现方式。

这是否回答了您的问题@SelimYıldız正如我所说,我没有这一页的母版页,我们这里缺少了一些东西。在“查看源代码”中搜索“表单”,看看是否可以找到第二个表单?@IrishChieftain即使在“查看源代码”页面中,它也只显示一个表单标记。您可以显示上载()方法的代码吗?这是否回答了您的问题@SelimYıldız正如我所说,我没有这一页的母版页,我们这里缺少了一些东西。在“查看源”中搜索“表单”并查看是否可以找到第二个表单?@IrishChieftain即使在“查看源”页面中,它也只显示一个表单标记。您可以显示上载()方法的代码吗?如果我删除表单标记,它显示页面必须同时包含一个表单标记server@chethu你能把完整的代码贴在这页后面吗。至少页面加载方法?@chethu希望您的方法导出\单击位于代码隐藏页面中,而不是在aspx中。或者是吗?如果我删除表单标签,它会显示一个页面必须同时包含一个表单标签server@chethu你能把完整的代码贴在这页后面吗。至少页面加载方法?@chethu希望您的方法导出\单击位于代码隐藏页面中,而不是在aspx中。还是这样?
<%@ Page Language="C#" AutoEventWireup="true" EnableEventValidation="false" CodeFile="ESign_License.aspx.cs" Inherits="ESign_License" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>       
</head>
<body>
<form id="license" runat="server">       
        <asp:Image ID="logo" runat="server" ImageAlign="Middle" Width="100px" Height="100px" CssClass="img" /><br />       
    <table style="width: 100%; height: 800px">
        <tr>                
            <td colspan="2" align="center">
                <asp:Image ID="logo" Width="100px" Height="100px" runat="server" ImageUrl="~/Image/kar_logo4.jpg" ImageAlign="Middle" />
            </td>

        </tr>
        <tr style="height:10px!important;">
            <%-- <td class="auto-style2"></td>--%>
            <td colspan="2" align="center">
                <span style="font-size: 25px">License</span>
            </td>
        </tr>
        <tr style="height:10px!important;">
            <td class="auto-style2"></td>
            <td style="border: 0px; margin: auto;  width: 40%; text-align: left">
                <br />

                  Registration No -
                        <asp:Label ID="Reg_no" runat="server"></asp:Label>
                <br />
                License No -
                        <asp:Label ID="lbllice_no" runat="server"></asp:Label><br />
                Valid From -
                        <asp:Label ID="isueDate" runat="server"></asp:Label><br />
                Valid upto -
                        <asp:Label ID="validDate" runat="server"></asp:Label>

            </td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <b>FORM 'A2' </b>
                <br />
                ACKNOWLEDGEMENT<br />
                (<asp:Label ID="License_type" runat="server" Text="Label"></asp:Label>
                )<br />
                [See Clause 8 (3)]<br />
            </td>
        </tr>
    </table>
    <br />
    <div class="row">
        <div class="col-md-12">
            <table class="table">
                <tr>
                    <td colspan="2" style="padding-top: 0px; height: 30%">
                        <p>
                            Received from
                                           <asp:Label ID="lblmrs" runat="server"></asp:Label>
                            &nbsp;<asp:Label ID="lblname" runat="server"></asp:Label>
                            ,
                                        <asp:Label ID="lblpname" runat="server" Text="Label"></asp:Label>
                            , a complete Memorandum of Intimation along with Form O, fee of Rs.
                                                <asp:Label ID="lblfee" runat="server"></asp:Label>
                            /- bearing SBI(Govt.),
                                                <asp:Label ID="lblbranch" runat="server"></asp:Label>
                            , Dated
                                                <asp:Label ID="lblpaiddate" runat="server"></asp:Label>
                            .
                                                <br />
                        </p>
                        <br />
                        <p>This acknowledgement shall be deemed to be the letter of authorization entitling the applicant to carry on the business as applied for, for a period of 5 years from the date of issue of this Memo of acknowledgement unless suspended or revoked by the competent authority.</p>
                        <br />
                        <p>

                                        <asp:Label ID="lblrespon" runat="server"></asp:Label>
                            ,
                                            <asp:Label ID="lblradres" runat="server"></asp:Label>
                            , Email-id:
                                                <asp:Label ID="lblemail" runat="server"></asp:Label>
                            , Mob. No:
                                                <asp:Label ID="lblmob" runat="server"></asp:Label>
                            &nbsp;is the responsible officer as per clause 24 of FCO, 1985.
                        </p>
                        <br />
                        <br />
                        *Enclosed details of Fertilizers in Annexure.
                    </td>
                </tr>

            </table>
     </form>
  </body>
  </html>

   protected void export_click(object sender, EventArgs e)
    {
        using (StringWriter sw = new StringWriter())
        {
            using (HtmlTextWriter hw = new HtmlTextWriter(sw))
            {
                string strid = Utilities.Decrypt(Request.QueryString["lbid1122"].ToString().Trim().Replace(" ", "+"), ConfigurationManager.AppSettings["AadharEncKey"]);
                string appPath = HttpContext.Current.Request.ApplicationPath;
                logo.ImageUrl = Server.MapPath(".") + "\\Image\\kar_logo4.jpg";                   
                string path = Server.MapPath(appPath + "eSign/eSignfiles/" + strid + ".pdf");
                this.Page.RenderControl(hw);
                dynamic output = new FileStream(path, FileMode.Create);
                StringReader sr = new StringReader(sw.ToString());
                Document pdfDoc = new Document(PageSize.A4, 10f, 10f, 10f, 0f);
                PdfWriter writer = PdfWriter.GetInstance(pdfDoc, output);
                pdfDoc.Open();                  
                XMLWorkerHelper.GetInstance().ParseXHtml(writer, pdfDoc, sr);                   
                pdfDoc.Close();
                Response.ContentType = "application/pdf";
                Response.AddHeader("content-disposition", "attachment;filename=" + strid + ".pdf");
                Response.Cache.SetCacheability(HttpCacheability.NoCache);
             }
        }
    }
protected void Page_Load(object sender, EventArgs e)
    {       
            pageName = Path.GetFileName(Request.Path);
            uid = Session["UserID"] != null ? Convert.ToString(Session["UserID"].ToString().Trim()) : "";
        if (IsPostBack == false)
        {
            if ((Session["RoleCode"].ToString() == "11") || (Session["RoleCode"].ToString() == "2") || (Session["RoleCode"].ToString() == "5") || (Session["RoleCode"].ToString() == "8") || (Session["RoleCode"].ToString() == "4"))
            {
                uploading();
                gridstoragebind();
                export_click(this, null);
            }
            else
            {
                Session.Clear();
                Response.Redirect("~/Login.aspx");
            }
        }
 private void uploading()
   {
    try
    {
        if (con.State == ConnectionState.Closed)
            con.Open();
        string strid = Utilities.Decrypt(Request.QueryString["lbid1122"].ToString().Trim().Replace(" ", "+"), ConfigurationManager.AppSettings["AadharEncKey"]);            

        string query = "select LI.RegNo,af.App_Name,af.Photo,d.DName,t.TName,ur.Gender,af.Sales_Adress,dt.Dealer_Region,LI.License_No,LI.Responsible_person,LI.Generated_Date,LI.Respo_Adres,LI.Respo_adhar,LI.Respo_email,LI.Respo_Mob, convert(varchar(100),LI.Issue_Date,103) Issue_Date,convert(varchar(100),LI.Valid_Date,103) Valid_Date,d.DName,t.TName,LI.Approved_by,FP.AmountPaid,FP.BranchName,convert(varchar(100),FP.PaidDate,103) as PaidDate from FL_License_issued as LI " +
                        "join FL_Form_A1 as af on af.Reg_No=LI.RegNo " +
                        "join User_Registration as ur on af.user_id = ur.user_id " +
                        "join FL_mst_Applying_category as dt on LI.Dealer_Type=dt.Dealer_Code " +
                        "left join FeePayment as FP on LI.RegNo=FP.RegNo " +
                        "left join District as d on LI.ADistrict=d.DCode " +
                        "left join Taluk as t on LI.ADistrict=t.DCode and LI.ATaluk=t.TCode " +
                        "where LI.RegNo='" + strid + "'";

        SqlDataAdapter ad = new SqlDataAdapter(query, con);
        DataTable dt = new DataTable();
        ad.Fill(dt);

        if (dt.Rows.Count > 0)
        {
            Reg_no.Text = dt.Rows[0]["RegNo"].ToString().Trim();
            lbllice_no.Text = dt.Rows[0]["License_No"].ToString().Trim();
            isueDate.Text = dt.Rows[0]["Issue_Date"].ToString().Trim();
            validDate.Text = dt.Rows[0]["Valid_Date"].ToString().Trim();
            License_type.Text = dt.Rows[0]["Dealer_Region"].ToString().Trim();

            lblfee.Text = dt.Rows[0]["AmountPaid"].ToString().Trim();
            lblbranch.Text = dt.Rows[0]["BranchName"].ToString().Trim();
            lblpaiddate.Text = dt.Rows[0]["PaidDate"].ToString().Trim();
            Session["approved_by"] = dt.Rows[0]["Approved_by"].ToString().Trim();

            if (dt.Rows[0]["Photo"].ToString().Trim() != null || dt.Rows[0]["Photo"].ToString().Trim() != "")
            {
                Session["Photo"] = (byte[])dt.Rows[0]["Photo"];
                string encrypt_id = Utilities.encrypt(Utilities.convt("3"), ConfigurationManager.AppSettings["AadharEncKey"]);
                // img_dealer.ImageUrl = "Image.aspx?id=" + encrypt_id + "";
                Session["ImageUrl"] = "Image.aspx?id=" + encrypt_id + "";
            }
            else
            {
                // img_dealer.ImageUrl = null;
            }


            if (dt.Rows[0]["Approved_by"].ToString().Trim() == "8")
            {
                lbl_seal.Text = "Assistant Director of Agriculture";
                lbltplace.Text = dt.Rows[0]["TName"].ToString().Trim();
                lbldplace.Text = dt.Rows[0]["DName"].ToString().Trim();
            }
            else
            {
                lbl_seal.Text = "Joint Director of Agriculture";
                //lbldplace.Text = dt.Rows[0]["DName"].ToString().Trim();
            }

            DateTime today = DateTime.Today;
            lblname.Text = dt.Rows[0]["App_Name"].ToString().Trim();
            lblpname.Text = dt.Rows[0]["Sales_Adress"].ToString().Trim();
            lblrespon.Text = dt.Rows[0]["Responsible_person"].ToString().Trim();
            lblradres.Text = dt.Rows[0]["Respo_Adres"].ToString().Trim();
            ////lblrespoaadar.Text = dt.Rows[0]["Respo_adhar"].ToString().Trim();
            lblemail.Text = dt.Rows[0]["Respo_email"].ToString().Trim();
            lblmob.Text = dt.Rows[0]["Respo_Mob"].ToString().Trim();
            lblgeneDate.Text = dt.Rows[0]["Generated_Date"].ToString().Trim();


        }

    }