I am currently writing a download system that takes XML from a document and displays it on a web page.
The problem I am facing is that whenever I add a part of the XML extraction to the website, the compiler will return an error as indicated in the title. I have already added WindowsBase, both from the manual and from the drop-down menu.
Currently my code looks like.
<script runat="server"> </script> <div> ViewState Data: <b><asp:Label ID="lblString" runat="server"/></b> <asp:Button ID="btnClick" runat="server" Text="Get ViewState Data" OnClick="btnClick_Click"/> <asp:Button ID="Closeform" runat="server" Text ="Hide PageState" OnClick="Close" /> <br /><br /><br /><br /><br /> <asp:FileUpload id="FileUploadControl" runat="server" /> <asp:Button runat="server" id="UploadButton" text="Upload" onclick="UploadButton_Click" /> <asp:TextBox Text="" runat="server" ID="displayFilepath" /> <br /><br /> <asp:Label runat="server" id="StatusLabel" text="Upload status: " /> <br /> <br /> <br /> <br /> <div id="box1" class="box"> <div class="box-top"> Data Sources inside document </div> <div class="box-middle"> <asp:Label runat="server" id="labelContentControls" text="label of content in document" /> <p> Test </p> <p> Test </p> </div> <div class="box-bottom"> </div> </div> <div id="box2" class="box"> <div class="box-top"> Data sources existing on the server </div> <div class="box-middle"> <asp:Label runat="server" id="labelDatabasefields" text="label of content in database" /> <p> Test </p> <p> Test </p> </div> <div class="box-bottom"> </div> </div> <input type="button" value="Create Template" id="view" class="form_button"/> </div>
And the code that seems to cause problems is one of two things.
internal static class W { public static XNamespace w = "http://schemas.openxmlformats.org/wordprocessingml/2006/main"; public static XName body = w + "body"; public static XName sdt = w + "sdt"; public static XName sdtPr = w + "sdtPr"; public static XName tag = w + "tag"; public static XName val = w + "val"; public static XName sdtContent = w + "sdtContent"; public static XName tbl = w + "tbl"; public static XName tr = w + "tr"; public static XName tc = w + "tc"; public static XName p = w + "p"; public static XName r = w + "r"; public static XName t = w + "t"; public static XName rPr = w + "rPr"; public static XName highlight = w + "highlight"; public static XName pPr = w + "pPr"; public static XName color = w + "color"; public static XName sz = w + "sz"; public static XName szCs = w + "szCs"; } public static class XMLfromDocument {
OR
WordprocessingDocument _TempDoc = WordprocessingDocument.Open(Server.MapPath("~/") + filename, true);
Deval source share