Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17







The successor to Active Server Pages, ASP.NET websites utilize the .NET framework to produce dynamic, data and content-driven web applications and services. ASP.NET code can be written using any .NET supported language. As of 2009, ASP.NET can also apply the Model-View-Controller (MVC) pattern to web applications

Share tech news, updates, or what's on your mind.

Sign up to Post

assume i have xml file call abc.xml

do you know any plug-in or app in c#/aspx.net that will create step by step form wizard based on the xml structure.
below we will start to read 'Notary' & 'CA' then i should have three steps

I just need some sort codes example to start.

          <Bond Name="Notary">
            <State name="CA"> 
              <Principal step="Step 1">
                <input type="text" class="" id="principalFirstName" placeholder="First Name" value=""></input>              
                <input type="text" class="" id="principalLastName" placeholder="Last Name" value=""></input>
                <input type="text" class="" id="principalMiddleName" placeholder="Middle Name" value=""></input>
                <input type="text" class="" id="principalCompanyName" placeholder="Company Name" value=""></input>
                <input type="text" class="" id="principalDBA" placeholder="DBA" value=""></input>
                <input type="text" class="" id="principalAddress" placeholder="Address" value=""></input>
                <input type="text" class="" id="principalCity" placeholder="City" value=""></input>
                <input type="text" class="" id="principalState" placeholder="State" value=""></input>
                <input type="text" class="" id="principalZip" placeholder="Zip" value=""></input>
                <input type="text" class="" id="principalPhoneNo" placeholder="Phone No" 

Open in new window

Free Tool: Path Explorer
LVL 10
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Good afternoon,
I'm having an issue here, I was assigned a project, I decided to use it to learn MVC as I was doing it. so what I'm saying is that I'm new to asp.net MVC.  I wont post my controller since its not been fire, I get the error before it fires my [httppost]
this is the error I'm getting: Unable to cast object of type 'System.Char' to type 'System.String'.
here is the models

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace BiciPublica.Models
    public class Usuario
        public int Id { get; set; }
        public string Nombres { get; set; }

        [Display(Name ="Primer apellido")]
        public string PrimerApellido { get; set; }

        [Display(Name = "Segundo apellido")]
        public string SegundoApellido { get; set; }

        public string Cedula { get; set; }

        [Display(Name = "Fecha nacimiento ")]
        public DateTime FechaNacimiento { get; set; }

        public string Rh { get; set; }

        public char Genero { get; set; } 

        [Display(Name = "Dirección")]

Open in new window

Hi Experts,

I am generating some labels as shown in Label1.png. My design is in Labeldesign.png.  My client needs the output in two columns as shown in Label_Desired.png. Please suggest is there any way to do it?

Thanks in advance.

I want to set Target Framework as .NET Standard 2.0 for my new .NET project. Where can I find the download so that I an install n my machine and use for new projects with .NET standard 2.0 as target .

Please se the attached,

Hi Experts,

I have telerik:RadNumericTextbox inside Gridview control.
I want to update the textbox value into the database (on lost focus event or onclick of button) for particular record.

gridtext.JPGHow do I achieve the task?
(Using Javascript or without javascript.)

D Patel
Hi experts,

I'm using ASP.NET MVC 5 with C#

On my view I have a DisplayFor displaying a datetime field.

My date time field is stored in sql server as datetime format

This is my current razor for this label on my page.

@Html.DisplayFor(m => m.MyTestDate)

With this syntax the browser displays this on my page.

07/17/2017 07:30:00 AM

Question 1: How do I format the razor DisplayFor tag to display only the date like this?:


Question 2: How do I format the razor DisplayFor tag to display only the time like this?:

07:30:00 AM
Hello Experts,
I am working on a Windows Service application in C#.  It is working fine in local machine.  I am getting the following error message when try to install in Production box.  I have set the Platform Target to Any CPU and Target Framework to .NET Framework 4.5. .  Also I tested it by changing the Platform Target to x86  and to x64.  But still getting the same error.  Please let me know how to fix it.  Thank you in advance.

Error Message
Exception occurred while initializing the installation:
System.BadImageFormatException: Could not load file or assembly 'file:///D:\Domains\XxxService\XxxPmtService.exe'
or one of its dependencies. An attempt was made to load a program with an incorrect format..

C:\Windows\Microsoft.NET\Framework64\v4.0.30319>installutil -i D:\Domains\XxxService\XxxPmtService.exe
I have an aspx page that runs a stored proc. The stored proc returns a value ( a record ID) after performing a few insert statements.  I want to get that return value with vb code.  My current code (see * below) gets an error message: "Input string was not in a correct format."  I can't find the right code to get the return value.  What is the flaw(s) in my code?

Thanks for looking.

The stored proc:
CREATE PROCEDURE [dbo].[CreateEval]
	    @EmployeeNumber int
	  , @EmpLastName varchar(30)
	  , @EmpFirstName varchar(30)
	  , @EmpDepartmentID int
	  , @EmpJobTitleID int
	  , @SupervisorID int
	  , @SupLastName varchar(30)
	  , @SupFirstName varchar(30)
	  , @SupervisorDeptID int
	  , @SupervisorTitleID int
	  , @EvalID int = NULL OUTPUT

	/*some inserting happens here		

	/*some inserting happens here		

	   , SupervisorID
	   , EvalDate)
	VALUES (@EmployeeNumber
		  , @SupervisorID
		  , GETDATE())
	INSERT INTO EvalScoring

Open in new window

Here is the sql data source:
<asp:SqlDataSource ID="dsCreateEval" runat="server" ConnectionString="<%$ ConnectionStrings:EmpEval_TestConnectionString %>" SelectCommand="CreateEval" SelectCommandType="StoredProcedure"

Open in new window

I am writing a C# console application using VS2015 and .NetFramework 4.5.
I use a foreach loop as follows and it works fine.

However, I was told that the directory I am currently using will now contain other files besides the files that my program processes.

My program should only process the following 3 types of files:

The # symbol means the value is a number. Thus, the first 2 files names have a prefix of 30 numeric characters

1)        ##############################_Rear.TIF    
2)        ##############################_Front.TIF  
3)        FargoChkImg######.xml

Can you think of a way to bypass all filenames except the 3 filename types shown above in the following snippet of code?

 foreach (FileInfo file in parentDirectory.GetFiles())
                    if (file != null && XmlFile(file.FullName, sw1))
                        sw = new StreamWriter(goodFilePath);
                        ProcessFile(file.FullName, sw, sw1);
                    else if (!hasElseBeenExecuted)  
                        hasElseBeenExecuted = true;  
                        sw = new StreamWriter(emptyFilePath);
                catch (Exception ex)
                    sw1 = new StreamWriter(errorFilePath);
                    if (sw1 != null) sw1.Close();…
Hello Experts,
I have a Windows Service program in C#, 1. which is attaching a xxx.txt file in an email attachment, and 2. should delete it after that.  Only the first part of the program is working.  At 2nd part, I am getting the exception "The process cannot access the file XXX because it is being used by another process".  At this point the file has been locked #1.  Any idea how to fix it?  Thank you very much in advance.

This is how I am trying to delete the file.  At this point if I change the folder name and try to delete the file it works fine.

Array.ForEach(Directory.GetFiles(filePath), File.Delete);

Thank you !
Industry Leaders: We Want Your Opinion!
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

I want to have bigger height to overall div below. What to adjust?
                <div class="imagesList-item-frame shadow"/>
                    <img src=<%=lb_pict5.Text %> onclick="pict_click5();" />
                    <div class="legend">
                        <input type="textbox" id="tb_p5_desc" style="height:20px; width:116px; border:inherit; background-color:#C5C4CC;" runat="server" /><label id="show5"></label>
                        <input type="text" id="tb_p5_desc2" style="height:20px; width:118px; border:inherit; background-color:#C5C4CC; display: none" value="TEST:" runat="server" />
                        <!---span>Some descriptions here</span><br /--->
                        <input type="button" id="butt_p5" onclick="openPopup5();" style="height:26px; width:97px" value="删除照片" runat="server" />

Open in new window

I'm used to being able to use session variables or (in an older application) the authentication provided by ASP .NET to control security/access within my web app. Now, for a couple of reasons, I need to POST and GET data between pages but I'm struggling with how this is done. I need a simple way,using C#, to POST some data from one page and then GET (process/retrieve) it on another page. Can someone provide me with simple clear examples or code for how this is done? I'm using VS 2012 and 2015.
I have an asp.net website that uses ajax and javascript.

I changed the javascript variable name but when i run the website and view the code i see the old vairable name. How do i get the progarm to use the new information.

I tried clearing the cookies and press f5
I am developing an ASP.NET application using C# with VS2015 and .NetFramework 4.5.
How would you revise the following "FileInfo" statement to read in files that are formatted as
exactly 20 numeric characters followed by a period followed by "tiff"?

For example:  

FileInfo[] fi = di.GetFiles("*.tiff");
I have been in the Asp.net world for while and built web sites with membership.  I want to use better technology to build Web Apps with security.  Basically, a web based software.  I know this is probably a dumb question, but what is the best stack to make this happen today.  I am familiar with most technologies.  I am better at Web Front End development.  I will also need to be able to consume data from a REST API Jason for my project.  The app will have user and role based security. Can anyone provide some direction?

Web app (software like an accounting app)
User and Role based for data views
Not currently tied to any technology (ie. .net, javascript, Node.js, MSSQL, MySQL, Stateless...)
Can you please tell me where the error is?

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;

namespace Scaffld.Models
    public partial class Employee

    public class EmployeeMetaData
        // Id property is hidden and cannot be changed
        [HiddenInput(DisplayValue = false)]
        public int Id { get; set; }

        // EmailAddress is read only
        public string EmailAddress { get; set; }

        public int? Salary { get; set; }

        public string PersonalWebSite { get; set; }

        [DisplayAttribute(Name = "Full Name")]
        public string FullName { get; set; }

        [DisplayFormat(DataFormatString = "{0:d}")]
        public DateTime? HireDate { get; set; }

        [DisplayFormat(NullDisplayText = "Gender not specified")]
        public string Gender { get; set; }

Open in new window

Server Error in '/Scaffld' Application.

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific 

Open in new window

In a simple ASP.NET Core 2 Application in which I am using CodeFirst, I am trying to run Update-Database command in PackageManger Console Window (an InitialMigratio has already been created successfully). However I get the followin error.
Keyword not supported: 'mulitpleactiveresultsets'.
I suspect there is probably some erroy in my Connection String in my appsettings.json file.
The ConnectionString I have in appsettings.json file currently looks like this.

 "ConnectionStrings": {
    "Default": "Server=(localdb)\\mssqllocaldb;Database=Webroute;Trusted_Connection=True;MulitpleActiveResultSets=true"

I would appreciate if could let me know if there is any error in the way I have defined the connection string and if the ConnectionString is correct what could the cause of the error message (Keyword not supported: 'mulitpleactiveresultsets'.) I am getting and how could I fix this.
Thank you for your help.

The complet appsettings.json file in my project looks like this:

 "ConnectionStrings": {
    "Default": "Server=(localdb)\\mssqllocaldb;Database=Webroute;Trusted_Connection=True;MulitpleActiveResultSets=true"
  "Logging": {
    "IncludeScopes": false,
    "LogLevel": {
      "Default": "Warning"

Open in new window

I am getthing this error message and con no see what is wrong.

The code is at http://www.marshallville-meats.com/test/Default.aspx

you will need to be login
User Name is rrr21
password is green2Apple$

after loging in go to home page and pick item
add the item to the cart
press the cart button at top of page
press the proced to checkout
press next (usp shipping)
press check out

When i press f12 i get the error

i attached the error message as an attached file
Dear Experts,

While running the application I am getting an error as below :

I have used the following code
                                                                    <telerik:RadComboBox ID="rd1" Runat="server" width="100px"
                                                                        TabIndex="14" AutoPostBack="true" ToolTip="Select Size 1" EnableVirtualScrolling="true" ShowMoreResultsBox="true"
                                                                        ShowToggleImage="true" EnableLoadOnDemand="false" Filter="Contains" MarkFirstMatch="true" ChangeTextOnKeyBoardNavigation="true"
                                                                        DataSourceID="dsSize1" DataTextField="sSize1" DataValueField="nSizeID1">
                                                                        <CollapseAnimation Duration="200" Type="OutQuint"/>
                                                                    <telerik:RadComboBox ID="rd2" Runat="server" width="100px"
                                                                        TabIndex="14" AutoPostBack="true" ToolTip="Select Size 1" EnableVirtualScrolling="true" ShowMoreResultsBox="true"

Open in new window

On Demand Webinar - Networking for the Cloud Era
LVL 10
On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Here's my server side code but it postbacks and navigate to first tab. How to prevent that postback event/ action is my problem.

  {protected void lnkIssue_Click(Object sender, EventArgs e)

             txtIssuedID.Value = "";
             xtSummary.Value = "";
             txtDetailsIssue.Value = "";
             txtadvice.Value = "";
             txtaction.Value = "";
             txtAnalysis.Value = "";
             txtResolution.Value = "";
I am using the following function in a asp.net website. Some said to use fidder but i can not see how to find the variable.

When i use a alert(Token) it comes with underfined. How can i see what the variable is in javascript.
  function SendForm()
               var Amount = $get("txtOrder").value;
               var OrderId = $get("txtAmount").value;
               var Email = $get("txtEmail").value;
               var FirstName = $get("txtFirstName").value;
               var LastName = $get("txtLastName").value;
               var Address = $get("txtAddress").value;
               var City = $get("txtCity").value;
               var State = $get("txtState").value;
               var Zip = $get("txtZip").value;
               var Token = PageMethods.GetToken(Amount, OrderId, Email, FirstName, LastName, Address, City, State, Zip);

    public static string GetToken(string OrderId, decimal Amount, string Email, string FirstName, string LastName, string Address, string City, string State, string Zip)

        return  CreditCardClass.CreditCardMain(Amount, OrderId, Email, FirstName, LastName, Address, City, State, Zip);
        // test of retrun
Can you please tell me why its not showing the database?
I have an ASP.Net MVC view that submits a document by calling an API in a different project. The API is an HttpPost ActionResult. I want to display for the user a popup message box that displays the newly created auto id and a Success message. I prefer to keep them on the same page. What is the best way to do this?
a client has requested me to develop an Intranet site using Visual Studio 2015, ASP.Net C#, MVC5 pattern and SQL Server 2012 R2. Users from this company speaks in English, Spanish or Portugess, so they need to access the new Intranet app in their corresponding idioms.
The only thing that really complicate me is how to add the multiple 'Idioms' support.
The request is that the site be developed in English as the default language but more idioms will be added, initially "Spanish".
This client showed me a couple of intranet applications that support this function. In one case, the app adds a folder with the idiom name, "spanish" for example, and have kind of txt files with translations in it.
Another app contained translated pages, for example, "login_eng.html" (English page version), then other called "login_spa.html" (Spanish page version) and then other called "login_por.html" (Portugues page version)
Other intranet app He talked to me uses the "Resources" from Visual Studio, as he said (I did not see this one).
So I am now confused, what is the best approach or practice to add Idiom support to an asp.net C# MVC Intranet application?
Greetings again,

I have a repeater control called Repeater1.

Users are given two submit buttons.

One submit button allows users to fill out their forms and submit to the database.

The second submit button allows users to save their work and come back to complete the form later.

These submit buttons work.

When a user click the Save and finish later button, when s/he comes back, we would like to display the records already submitted so user knows where to continue from.

I have a stored procedure that pulls data from the database to populate the Repeater form if the record exists.

When I try to run the code, I get the following error message:

DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'RegNo'

Any ideas what I am doing wrong?

Here is some code snip:

//Stored Procedure:
CREATE PROCEDURE [dbo].[uspGetRecs] @pin int
select RegNo, VRegNo, RetdVal,TRetdVal
  FROM MyInfo
  WHERE id = @id
      private void getRecs(int id)
          SqlConnection conn = new SqlConnection(connStr);
          SqlCommand cmd = new SqlCommand("uspGetRecs", conn);
          cmd.CommandType = CommandType.StoredProcedure;
          SqlParameter p1 = new SqlParameter("@id", id);
          SqlDataAdapter sda = new SqlDataAdapter(cmd);
          DataTable dtPreviousRecords = new DataTable();
          Repeater1.DataSource = 

Open in new window







The successor to Active Server Pages, ASP.NET websites utilize the .NET framework to produce dynamic, data and content-driven web applications and services. ASP.NET code can be written using any .NET supported language. As of 2009, ASP.NET can also apply the Model-View-Controller (MVC) pattern to web applications