Jump to content

Search the Community

Showing results for tags 'ASP.NET'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH


  • Community Calendar




Website URL








Found 50 results

  1. How to parse a word document

    How can we parse a word document using asp.net and c#. The question I have is with respect to parsing a word document, say a resume, to read the contents like name and email address. For this, I have an idea, but not sure of how to implement it. Can someone help me on this?My idea is: -Take the first line, if there are two or more words (other than curriculum vitae)separated by a single space or using a period(.) followed by a space, it is a name. -Take the second line, if there are two or more words separated by a single space or using a period(.) followed by a space, it is a name. -Consider the last line, if there are two or more words separated by a single space or using a period(.) followed by a space, it is a name. -Consider the second last line, if there are two or more words separated by a single space or using a period(.) followed by a space, it is a name. I know how to read tellno and email using patters, but, I dont know how to implement finding out the name. Is there any idea ?
  2. The root problem is an ASPX (ASP.NET) web page program, part of an important business program presently in development and connected to an sql server database (.mdf) file, is presently unable to do two procedures: rs=Server.CreateObject("ADODB.Recordset") and rs.Open (sql1,conn). Both operations return rs.State = False. The reason is not clearly understood. The system is Windows XP SP3. The only error observed in the MSSQL ERRORLOG is: The SQL Server Network Interface library could not register the Service Principal Name (SPN) for the SQL Server service. Error: 0x54b, state: 3. Failure to register an SPN may cause integrated authentication to fall back to NTLM instead of Kerberos. This is an informational message. Further action is only required if Kerberos authentication is required by authentication policies. When researched on Internet this first url was found: Reference(1): https://blogs.technet.microsoft.com/mdegre/2009/11/08/the-sql-network-interface-library-was-unable-to-register-spn/ Where it says: If you run SQL Server under the LocalSystem account, the SPN is automatically registered as SQL registering with the machine account that has the right to create an SPN default. So Kerberos interacts successfully with the server running SQL Server. The settings currently in use are SQLEXPRESS (2008R2) service, on Manual, with Local System startup account logon. This startup account is believed to have enough permissions to register the SPN, but that may be for an sql expert to decide. The SQL Server is started manually using the System Tray Icon, when needed. So upon further thought, the inadequate permission argument for causing the failed Recordset object creation does not seem to make complete sense. Since the Local System account being used for the sql server startup account should already have enough permission? On the other hand, the SQL ERRORLOG continues to say it could not register the SPN? (So Internet research was continued.) Then on Internet this second url was found: Reference(2): https://blogs.msdn.microsoft.com/dataaccesstechnologies/2010/01/06/how-to-grant-readserviceprincipalname-and-writeserviceprincipalname-rights-to-sql-server-service-start-up-account-without-using-adsdiedit-tool/ Comment: Ironically (considering the url article title) the decision was to use the ADSI Edit tool to assign greater permissions. Where it says: Instead of setting SPNs manually, you may want to give ReadServicePrincipalName and WriteServicePrincipalName rights to SQL Server service start-up account so that it can register and de-register SQL Server SPNs on its own whenever the SQL Server service is started and stopped. As the above articles describe, these rights can be granted from ADSIEDIT tool. Comment: The intended use of ADSI Edit tool seemed close to succeeding and might have succeeded but all attempts to connect ADSI Edit to the running SQL Server local instance have only been unsuccessful. ADSI Edit seems unable to see the running local sql server. Not enough was known about ADSI Edit to fix that. This is a standalone laptop without a domain and without a LAN. (But again there is the local sql server instance to connect to.) Then two SQL stored procedures sp_ActiveDirectory_SCP and sp_ActiveDirectory_Obj fail while attempting to register the SQL Server instance and the database (.mdf) file into the Active Directory database saying instead the system does not have Active Directory installed (but of course it does, at least partially). Then on Internet this third url was found: Reference(3): https://technet.microsoft.com/en-us/library/cc773354(v=ws.10).aspx Where it says: Adsiedit.msc automatically attempts to load the current domain to which the user is logged on. If the computer is installed in a workgroup or otherwise not logged on to a domain, the message "The specified domain does not exist" displays repeatedly. To resolve this issue, you may want to open an MMC, add the ADSI Edit snap-in, make connections as appropriate, and then save the console file. The ADSI Edit snap-in was succesfully added to MMC. But ADSI Edit still seems unable to make the connection in this situation. And the console file would not save. There are two command line tools (from win supp tools 2003) which can also set these R/W rights. One being setspn.exe and the other dsacls.exe. But they both also seem to read and store the permissions information in the Active Directory database (NTDS.dit) file. So Iwould not expect them to work either for similar reasons. It seems I am trying to get Active Directory working in a windows workgroup consisting of only one machine. Is that, by definition, impossible, since a workgroup needs to have a minimum of two machines? Reference(4): https://mssqlwiki.com/2013/12/09/sql-server-connectivity-kerberos-authentication-and-sql-server-spn-service-principal-name-for-sql-server/ The reference(4) does not change my situation because it still requires an Active Directory database which again requires a domain or workgroup (LAN) neither of which are present in my case. But reference(4) is still beneficial because it excels at providing such a detailed Active Directory configuration example. My last thought is that in the absence of a domain or workgroup (LAN), there are still present in my case the SQL Server instance and the localhost server (provided by MS Expression Development Server). So I came to wonder if it was possible for ADSI Edit to connect to those two servers somehow? (Attempts so far have been unsuccessful.) I cannot imagine how my situation is so unusual. Is mine the only machine running ms sql server in a standalone configuration? I would expect there to be (many) others. Thank you for your time. Please advise.
  3. Problem in Export to excel from asp.net

    I found some problem with below code when i am trying to export to excel using below code on IE and Mozilla Firefox. But sometime it works fine but sometime it works fine. So can you suggest me how i can resolve the problem? public static void ToExcel(GridView _grid, string FileName) { try { _grid.AllowPaging = false; PrepareGridViewForExport(_grid); string attachment = "attachment; filename=" + FileName + ""; HttpContext.Current.Response.Clear(); HttpContext.Current.Response.Buffer = true; HttpContext.Current.Response.BufferOutput = true; HttpContext.Current.Response.ClearContent(); HttpContext.Current.Response.AddHeader("content-disposition", attachment); //HttpContext.Current.Response.ContentType = "application/ms-excel";//Excel 2003 //application/vnd.ms-excel HttpContext.Current.Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";//Excel 2007 StringWriter sw = new StringWriter(); HtmlTextWriter htw = new HtmlTextWriter(sw); // Create a form to contain the grid htw.WriteLine(Heading); if (!string.IsNullOrEmpty(Company)) { if (!Company.Contains("Select")) htw.WriteLine("<br/><b>Company : </b>" + Company); } if (!string.IsNullOrEmpty(Department)) { if (!Department.Contains("Select")) htw.WriteLine("<br/><b>Department : </b>" + Department); } if (!string.IsNullOrEmpty(Region)) { if (!Region.Contains("Select")) htw.WriteLine("<br/><b>Region : </b>" + Region); } htw.WriteLine("<br/><b>" + Heading + "</b> From <b>" + FromDate + "</b> To <b>" + ToDate + "</b> "); htw.WriteLine("<br/><br/>"); HtmlForm frm = new HtmlForm(); _grid.Parent.Controls.Add(frm); frm.Attributes["runat"] = "server"; frm.Controls.Add(_grid); frm.RenderControl(htw); HttpContext.Current.Response.Write("<meta http-equiv=Content-Type content=text/html; charset=utf-8>" + Environment.NewLine); HttpContext.Current.Response.Write("HRMS Reports Sheet" + Environment.NewLine); HttpContext.Current.Response.Write(AddExcelStyling()); HttpContext.Current.Response.Write(sw.ToString()); HttpContext.Current.Response.Write("</body>"); HttpContext.Current.Response.Write("</html>"); HttpContext.Current.Response.Flush(); HttpContext.Current.Response.End(); } catch (Exception ex) { string str = ex.Message; } }
  4. I was in the middle of reading the tutorial, came back to it after a few hours and it was gone! Does anyone have a copy of it or can anyone recommend any services like w3schools? This is just one of the best ways to learn web languages I have ever experienced and would like to benefit from the information they took down. Thank you
  5. Greetings classmates! School is in session. It seems this is mostly a CSS question. So my apologies for any re-tread. I have seen numerous posts addressing similar, but can't seem to put it together. Any help or direction to existing solutions is greatly appreciated. I am Developing an ASP.NET/MVC5 web app. It uses bootstrap 3. I am new to bootstrap and never really got into CSS more than the basics. Question: How can I change/override the a:hover of a thumbnail to include a user-defined hoverscale? So in the thumbnail.less file I see: @thumbnailHoverScale : 1.3; . . . a:hover img.thumbnail { .selected(@thumbnailHoverScale); } HoverScale is not a style attribute it seems so I can't override in standard local definition HTML style="..."!?! I do understand I can define a <style/> in local HTML to override, but again fail to comprehend exactly how. Here is my HTML: <div id="thumbnailContainer"> <div class="thumbnail-loading-spinner"></div> <ul id="thumbnails" data-bind='template: {name:"thumbnailsTemplate", foreach: thumbnails}'></ul> <div class="admin"></div> </div> and the template: <script id='thumbnailsTemplate' type="text/x-jquery-tmpl"> <li> <a href="${Url}" data-vpath="${VPath}"> <img class="thumbnail" src="${UrlThumbnail}" /> </a> </li> </script> So basically in the template, I want to override hoverscale just for just the generated thumbs. I have tried a number of style="" property definitions, then realized HoverScale is not a property. I also tried a number of variations like: ...class="thumbnail {HoverScale:2}" I think I am close on this one, possibly, but not sure how I would apply it to just the generated thumbs?? <style> a.thumbnail:hover { .selected(3) } </style> with no joy. Anyone? Thanks! Cheers!
  6. Hi Guys, i am facing a problem in updating precomplied website. i have a precompiled website on server. i have taken copy of that website on my local machine and done some changes in sql query which fetches some data. this query is under App_code folder. and then i have copied everything and overwrites existing folders of this website on server (including App_code folder) . but when i run website, it gives me error on App_code folder (error:this is precomplied website) . and that's why i have removed App_code folder from server. and then website works fine but whatever i have changed in new query doesn't get reflected. now i want to do those changes but i am not able to. please guide me. Regards, Rhishikesh
  7. Dear friends, Basic need -------------- I need to call asmx webservice from javascript function. onbuttonclick, i am actually calling that javascript function. line with high size font is the problem area. please help guys working from past 5 days on this part WebService Registration with aspx page--------------------------------------------------- <form id="form1" runat="server"> <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" EnablePageMethods="true"> <Services> <asp:ServiceReference Path="~/dataPreExist.asmx"/> </Services> </asp:ToolkitScriptManager> WEBSERVICE ------------------ <ToolboxItem(False)> _ Public Class dataPreExist Inherits System.Web.Services.WebService <WebMethod()> _ Public Function EnqPreExistOrNot(ByVal paraCcn As String, ByVal paraPcode As String) As Boolean Dim strsql6 As New StringBuilder Dim localdt6 As New DataTable ' ccn = "DJ079" ' party = "04BSPT0066" With strsql6 .Append("select * from complaintmastercrm where ccncd='" & paraCcn & "' and partycd='" & paraPcode & "'") End With localdt6 = CommonDb.ReturnDataTable(strsql6.ToString, "CRM") If localdt6.Rows.Count > 0 Then EnqPreExistOrNot = True MsgBox("pre Enquiry Exist") MsgBox("Pre Enquiry not exist") Else EnqPreExistOrNot = False End If End Function End Class End Namespace Javascript Function ------------------------- function webServiceCall() { var paraCcn; //var paraPartyCd; var paraPcode; //alert('hello last') paraCcn = document.getElementById("<%=lblCcn.clientID%>").innerHTML; paraPcode = document.getElementById("<%=hdnParty.clientID%>").value; paraPcode = paraPcode.replace(/,s*$/, ""); var a = new namespace1.dataPreExist(); //not working block a.EnqPreExistOrNot(paraCcn, paraPcode, OnSucessorFail); //not working block } function OnSucessorFail() { debugger; var proceed; proceed = confirm("Enquiry already Generated for this Machine and Cost Center"); if (proceed == true) { return true; } else { return false; } }
  8. I am trying to develop asp.net webservice, but it gives Error:Attribute specifier is not a complete statement use a line continuation to apply the attribute to following sttatement.> coloured wth RED is the place where i am getting error following is my code block --------------------------------- <WebMethod(Description:="Method for checking ENQ PreExist or not")> _ Public Function EnqPreExistOrNot() As Boolean Dim strsql6 As New StringBuilder Dim localdt6 As New DataTable With strsql6 .Append("select * from complaintmastercrm where ccncd='" & lblCcn.Text & "' and partycd='" & ViewState("partycode") & "'") End With localdt6 = CommonDb.ReturnDataTable(strsql6.ToString, "CRM") If localdt6.Rows.Count > 0 Then EnqPreExistOrNot = True Else EnqPreExistOrNot = False End If End Function
  9. System.FormatException with ScriptManager

    String was not recognized as a valid DateTime. 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.FormatException: String was not recognized as a valid DateTime.Source Error: Line 68: <body onload="changeHashOnLoad();"> Line 69: <form id="form1" runat="server" class="w-wppr">Line 70: <asp:ScriptManager ID="ScriptManager1" runat="server" EnableScriptGlobalization="true"> Line 71: <Scripts> Line 72:
  10. DropDownlist Not showing any data

    I am trying to assign data to dropdownlist in asp.net from textbox Textchanged event but dropdownlist not showing any data . actually i am trying to connect with database asynchronously so that i must able to see suggestions just like google instant related with whatever i am enetering in textbox but i can't get it. any help will be appreciated. vb.net code ---------------- Protected Sub tXtCustomer_TextChanged(ByVal sender As Object, ByVal e As EventArgs) Handles tXtCustomer.TextChanged Dim strsql4 As New StringBuilder Dim localdt4 As New DataTable With strsql4 .Append("select mc.ccncd,mp.partycd from mccn mc inner join mparty mp on mc.PartyCd=mp.partycd where mp.PartyCd like '" & tXtCustomer.Text & "%' ") End With localdt4 = CommonDb.ReturnDataTable(strsql4.ToString, "ERP") If localdt4.Rows.Count > 0 Then drpCcnTrial.DataSource = localdt4 drpCcnTrial.DataBind() drpCcnTrial.DataTextField = "ccncd" drpCcnTrial.DataValueField = "ccncd" drpCcnTrial.Items.Insert(0, New ListItem("Select CCN from List", 0)) End If End Sub asp.net code ----------------- <asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Always" runat="server"> <Triggers> <asp:AsyncPostBackTrigger ControlID="txtCustomer" EventName="TextChanged" /> </Triggers> <ContentTemplate> <asp:TextBox ID="tXtCustomer" runat="server" autopostback="true" ></asp:TextBox> <asp:DropDownList ID="drpCustomer" runat="server"> </asp:DropDownList> </ContentTemplate> </asp:UpdatePanel>
  11. Hi please how can a user view another users profile on a datalist by clicking the user image on datalist
  12. Has anyone seen an intermittent buttons missing styling on a page before when in the enabled="false" state? I have a page that shows the buttons correctly in ie11 using win8 but on a desktop win7 ie11 does not show the buttons. They appear as text and when the checkbox is clicked triggers an onClick which enables the buttons okay. For some reason they are not styling intermittently. I don't believe its the client side script preventing it from appearing since it doesn't happen all the time and there doesn't seem to be a pattern or I haven't found one yet. Is there a setting in IIS that might be causing the problem? Someone was just working on the servers making adjustments and I received a windows security prompt which I've never seen before, but that's the test server. Live server is okay, but the buttons are a problem. Has anyone experienced this issue?
  13. how to upload file in ASP.NET in C#

    I am making a music store project.. I want some method so that users can upload mp3 files in it.. i have tried many codes but i cud not do it. please tell me how i can complete this..
  14. asp.net c# my photo gallery please help

    been searching for the answer for a long time i have this working code for a simple photo gallery for viewing photos when the images are too many it will take a long time to load all the imagebuttons i want to limit the imagebutton's to load only 10 photos, i will just put another next button for the next 10 photos and so on. this foreach loop portion is where it loads all the pictures inside the folder named "loveones" ImageButton imageButton = new ImageButton();FileInfo fileInfo = new FileInfo(strFileName);imageButton.ImageUrl = "~/pictures/loveones/" + fileInfo.Name;imageButton.Width = Unit.Pixel(200);imageButton.Height = Unit.Pixel(200);imageButton.Style.Add("padding", "5px");imageButton.Click += new ImageClickEventHandler(imageButton2_Click);Panel1.Controls.Add(imageButton); i wish some one could help me here in w3 school. thanks.
  15. i have a form in which i have a field date of birth , and a textbox to fill date of birth , when a person fills his date of birth like 01/01/1990 , then it will be saved into database , and when i retrieve this date form database then this comes 01/01/1990 12:00 AM , i want only date part from it. This is my form to fillup date of birth form.aspx <tr> <td width="30%"> Date of Birth <br /> </td> <td style="width: 1px"> :<asp:TextBox ID="txtDateofBirth" runat="server" placeholder="dd/mm/yyyy"></asp:TextBox> </td> <td class="td2"> </td> </tr> this is code for form.aspx.cs SqlCommand cmd = new SqlCommand("insert into ApplicantForm(NameofApplicant, dateofbirth)" + "values( @NameofApplicant, convert(Datetime, @dateofBirth, 103)", con); cmd.Parameters.AddWithValue("@dateofBirth",txtDateofBirth.Text); this is code for print of this date of birth print.aspx <asp:Label ID="txtDOB" runat="server" ></asp:Label> this is code print.aspx.cs SqlCommand cmd = new SqlCommand("Select * from ApplicantForm Where ApplicantId=" + ((Request.QueryString["ApplicantId"])) + "", con); dr = cmd.ExecuteReader(); txtDOB.Text = dr["dob"].ToString();
  16. Dear All, I am working on project in asp.net and vb.net as code behind. The project needs to take a data from database and based on that data, I want to build orgchart(organization chart). so I decided to use third party control called as basic primitives. they have shown Jquery version of orgchart on their website. also they have provided primitive.js file which holds all the jquery classes which are required to build orgchart. but my problem is how to pass my data from database to these jquery classes for building orgchart note: I am using visual studio 2010 .
  17. I want know what data will go to the server, when I click on save button of asp page without using update panel and using update panel .
  18. I am using Ajax File Upload control for uploading multiple files at same time. but i want use my own upload button (in my case save button) for uploading files not the ajax upload button. how can i do this ?
  19. ASP.net MVC tutorial corrections

    Using the .NET MVC tutorial, I noticed on http://www.w3schools.com/aspnet/mvc_layout.asp that the first code block needs updated. I believe It should be <!DOCTYPE html><html> <head> <meta charset="utf-8"/> <title>@ViewBag.Title</title> <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" /> <script src="@Url.Content("~/Scripts/jquery-1.7.1.min.js")" type="text/javascript"> </script> <script src="@Url.Content("~/Scripts/modernizr-2.5.3.js")"> </script> </head> <body> <ul id="menu"> <li>@Html.ActionLink("Home", "Index", "Home")</li> <li>@Html.ActionLink("Movies", "Index", "Movies")</li> <li>@Html.ActionLink("About", "About", "Home")</li> </ul> <section id="menu"> @RenderBody() <p>Copyright W3schools 2012. All Rights Reserved.</p> </section> </body></html> to match the updated jquery and modernizr files. Additionally, the "font" line in the other code block on that page should, if I am correct, be changed to "font-family" (And it would be nice on this page: http://www.w3schools.com/aspnet/mvc_views.asp to differentiate between "add to what's already in the file" and "switch with what's already in the file") Could someone with access to do so please update this?
  20. ASP.NET with MySql

    Hi all, I have 2 question need you help explain as below. Could we built ASP.NET Webform and use database with MySQL insteat of SQL Server? Could I hosting this project if I select Windows Platform on Godaddy.com? Thanks.
  21. I am working on asp.net project. i have a gridview which looks consistant on my monitor screen.but when my website's run on different shapes of monitor screen, alignment of gridview disturbes completely. following is my structure of gridview <div class="CSSTableGenerator" id="div1" style=" overflow:scroll ; height:450px" > <asp:GridView ID="GridView2" style="table-layout:fixed;" Width="100%; height:698px" AutoGenerateColumns ="False" AllowSorting="true" runat="server" CellPadding="4" ForeColor="#333333" GridLines="Both" > </asp:gridview> </div> here actually div is responsible for setting height of gridview. now i want to make my gridview flexible in size with any other monitor sizes. and hence i have decided to use window.innerheight and window.innerwidth in javascript but now major problem is how do i call javascript function onload of div. because div don't have onload event. please suggest solution .
  22. Z-Index of javascript windows

    we are opening multiple browser child windows using window.showmodellessdialog() method - Is there any way to get z-Index of this window w.r.t. parent window? window.style.zIndex gives null or undefined. I need Z-Index to maintain overlapping order of these windows. Regards, Shwetank
  23. I am using tab container from ajax toolkit for asp.net. i want to set background color for tabpanel's header area. how i can do it ?
  24. Guys, I have developed a website in asp.net using visual studio 2010. before 2 days it is working fine but now whenever i try to ctrl + F5 (run) project, project hangs for infinite time. i have run same project on another machine it is working fine so i have concluded that, may be there is a problem in visual studio that's why i have repair visual studio but no improvement. then i have reinstalled fresh copy of visual studio 2010 but still same problem exist. I have also tried to run the project from another drive. i have imported my aspx and user control (ascx) pages from c drive to d drive and tried to run the project. at this time there is no hanging of visual studio while running, but ASP namespace not found. and hence i am not able to access my user controls(ascx) pages through ASP namespace. please help me to sort out this problem. can this is possible because of virus attack ? should i format the PC ?
  25. I want to use TabControl from AjaxToolkitcontrol in Asp.Net, for that i have downloaded Ajaxcontroltoolkit.dll & using this into toolbox of visual studio. so when i Drag & Drop any Ajax control from toolbox on to webform and try to run it. whole visual studio 2010 application hangs. i think that, ajaxcontroltoolkit version is not matching with my visual studio's .NET framework. so i have tried Ajax toolkit control version from 3.5, 4.1& 4.5 while i am working with .Net Framework version of 4.0. but still application hangs. please let me know any possible solution