ASP.NET

123K

Solutions

28K

Contributors

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

Failed to install web server service IIS windows authentication & ASP due to error "Attempt to install ASP failed  with error code 0x8007007E. The specified module could not be found &  "Attempt to install windows authentication failed  with error code 0x8007007E. The specified module could not be found
0
Free Tool: SSL Checker
LVL 9
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Greetings again,

I have this RadioButtonList control with a Yes or option in Repeater control.

                 Purchased:<asp:radiobuttonlist ID="rblType" runat="server" RepeatDirection="Horizontal" TextAlign="Right" style="display:inline;">
                 <asp:ListItem Text="New" />
                 <asp:ListItem Text="Used" />
                </asp:RadioButtonList>

Open in new window


All I am trying to do is to ensure that user chooses either Yes or No before continuing.

I have done a lot RadioButtonList validations but have not found anything that works with Repeater control.

Any ideas experts?
0
We have a website and we want to record some instructions --> open the site, login, go thru the menus, etc. Like an instruction video.

Someone tried Webex, it didn't work (he said he gave up). Another tried Skype but couldn't get it working.

I found this that's free download  https://www.bandicam.com/  (they have a paid version too)

That works but anyone has used it? I don't know how to record my voice.

Any other tools I can use?
0
Hi,
i created dynamically  html button server side using c# code and  onclick() event , i am  calling server side method() on page post-back ...in server side redirect method some parameters are used ...

I want to redirect page in new tab and keep existing page as it is, please provide your solution  with onclick() event or server side code.

Server side dynamic html code created for link button:
fileTest.Append(" <span>");
fileTest.Append("<a id=\"lnkPsBtn" + TestCatBuilder.GetCategoryById(category.CategoryId).Name + "\" name =\"lnkPsBtn" + TestCatBuilder.GetCategoryById(category.CategoryId).Name + "\"onclick=\"SearchTestData('" + TestCatBuilder.GetCategoryById(category.CategoryId).Id + "')\" > ");
                    fileTest.Append(TestCatBuilder.GetCategoryById(category.CategoryId).Name);
                    fileTest.Append("</a></span>");
 
 Script code:
<script type="text/javascript">
        function SearchTestData(someid) {
            __doPostBack("lnkPsBtn" + someid, someid);
        }
 
        // Postback
        function __doPostBack(eventTarget, eventArgument) {
            if (!theForm.onsubmit || (theForm.onsubmit() !== false)) {
                theForm.__EVENTTARGET.value = eventTarget;
                theForm.__EVENTARGUMENT.value = eventArgument;
                theForm.submit();
            }
        }
    </script>
 
 
Test.Redirect(urlParams);
 
  /// <summary>
        /// this will redirect the current HttpContext to the …
0
I need for a manager to set a user's password on request.  I can reset the password, but the user still can't log in.  I have provided the code I am using below:

        [HttpPost]
        [AllowAnonymous]
        [ValidateAntiForgeryToken]
        public async Task<ActionResult> ResetPassword(ResetPasswordViewModel model)
        {
            if (!ModelState.IsValid)
            {
                return View(model);
            }
            var user = await UserManager.FindByNameAsync(model.UserName);
            if (user == null)
            {
                // Don't reveal that the user does not exist
                return RedirectToAction("ResetPasswordConfirmation", "Account");
            }

            
            string resetToken = await UserManager.GeneratePasswordResetTokenAsync(user.Id);

            var result = await UserManager.ResetPasswordAsync(user.Id, resetToken, model.Password);
            if (result.Succeeded)
            {
                using (var db = new RPIADbContext())
                {
                    var id = user.Id;
                    var usr = db.AspNetUsers.Find(id);
                    usr.MustChangePassword = true;

                    db.AspNetUsers.Attach(usr);

                    db.Entry(usr).Property(x => x.MustChangePassword).IsModified = true;
                    db.SaveChanges();
                }
                ViewBag.IsEdit = 1;
                return RedirectToAction("ResetPasswordConfirmation", "Account");

Open in new window

0
I already have model and controller that basically doing all the work I need. model is basically our domain class.
and controller is just all of combined classes that do all the thing we want like add, modify the data in xml or database.

our next is to create restful API that allow external users to use it. Do you have very simple example for us to get start it?
0
Before the Gridview at the bottom I need a button to add a new record but I can not figure out the html to make it work.

<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Admin.aspx.cs" Inherits="Test.Admin" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <script type="text/javascript" lang="javascript">
        $(document).ready(function () {

            //Initialize the Account Termination Date datepicker
            $('#divDatePicker').datetimepicker({
                format: 'MM/DD/YYYY',
                useCurrent: false,
                minDate: new Date(),
                maxDate: new Date().setYear(new Date().getFullYear() + 1)
            });
           
            //Initialize the BootGrid
            $(function () {
                $('#<%= grdAdmin.ClientID %>').bootgrid({
                    caseSensitive: false,
                    formatters: {
                        "commands": function(column, row)
                        {
                            var buttonText;



                            buttonText = "<button type=\"button\" class=\"btn btn-xs btn-default command-add\" data-row-id=\"" + row.ID + "\"><span class=\"fa fa-camera\"></span></button>" +
                                "<button type=\"button\" class=\"btn btn-xs btn-default command-edit\" data-row-id=\"" + row.ID + "\"><span class=\"fa fa-pencil\"></span></button> " +
     …
0
I am struggling to get a handle on this problem.

I have a textbox on Gridview control:

<asp:TextBox ID="txtboatRegNo" style="width:270px;margin-left:195px;" runat="server"></asp:TextBox>

Open in new window


and a textbox on Repeater control:

<asp:TextBox ID="txtARegNo" style="width:270px;margin-left:195px;" runat="server"></asp:TextBox>

Open in new window


The values for both textbox controls are the same.

The current process asks user to enter his registration number on Griview and the click next to go next page.

On next page, there is a different set of requirements that asks user to once again, enter the same registration number.

We see this as being extremely inefficient.

So, we decided that once a user enters his/her registration number on txtboatRegNo on Gridview, that value should auto fill the txtARegNo on Repeater control.

So far, the following query is not working in that it is not auto filling the value enter in Gridview on the Repeater control.

Does anyone know how to resolve this?

This is the script I have been working with:

  <script type="text/javascript">
         $(function () {
             $('[id*=txtboatRegNo]').change(function () {
                 $('[id*=txtARegNo]').val(this.value);
             });
         });
 </script>

Open in new window


Thanks in advance
0
Im working with ajax toolkit tabs it is working properly but when i am adding bootstrap css files the tabs css  overwrite
Can u Help me to SOlve this problem?
Thanks in advance
0
I created new ASP.NET WEB Form project in  VS2010
according  to web.config file
<add name="ApplicationServices"
         connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true"
         providerName="System.Data.SqlClient" />
  </connectionStrings>
I assumed to see aspnetdb.mdf in App_Data folder
But  I do not see anything , the folder is empty
0
PeopleSoft Has Never Been Easier
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Anyone knows how to get year, model, and maker for all Rv or motorhome or trailers? I have a project to build website that need to get Rv information for insurance quote ...


Thanks
0
today when i want to start to dubug ms asp.net website program the dianostic tools say it starting but does not do anythin. I triad anoter project and it still will not start. any ideas
0
When I click the button(add to cart) after selecting a qty from my dropdownlist, my cart page will show qty from the ddl. However the cart only shows 1 qty for the item in the cart page no matter what qty I select for my ddl !! Its only each time that I click the button that the qty in the cart page will increase... how do u change this??

This is the add to cart button code
  protected void btnAdd_Click(object sender, EventArgs e)
    {
        string iDetailID = detail.EventDetail_ID.ToString();
        ShoppingCart.Instance.AddItem(iDetailID, detail); 

        int ddlAmount, participants, itemNr;
        if (ValidateInput(out ddlAmount, out participants, out itemNr))
        {
            l1.Text = "";
            SetCookie();
            UpdateEventParticipantes(ddlAmount, itemNr);
            Response.Redirect(string.Format("Detail.aspx?id={0}", itemNr));
        }
    }

Open in new window

My cart page
  protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            LoadCart();
        }
    }
    protected void LoadCart()
    {
        gv_CartView.DataSource = ShoppingCart.Instance.Items;
        gv_CartView.DataBind();
        decimal total = 0.0m;
        foreach (ShoppingCartItem item in ShoppingCart.Instance.Items)
        {
            total = total + item.TotalPrice;
        }
        lbl_TotalPrice.Text = total.ToString();
    }
    protected void gv_CartView_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "Remove")
        {
            lbl_Error.Text = "Message : " + e.CommandArgument.ToString();
            string detailId = e.CommandArgument.ToString();
            ShoppingCart.Instance.RemoveItem(detailId);
            LoadCart();
        }
    }

Open in new window

ShoppingCart CLASS

Open in new window

0
Greetings Experts,

Background:
ASP.NET 4.6.1
C#
Material-Components-Web (to add Material Design to page)


I'm trying to use Material-Components-Web in an ASP.NET Forms project. The following code shows an icon inside a button.

<button type="submit" name="ctl00$maincontent$btnRefresh" id="maincontent_btnRefresh" class="mdc-fab mdc-fab--mini lexbe-fab">
        <i class="material-icons"> refresh</i>
</button>

protected void btnRefresh_Click(object sender, System.EventArgs e)
{
       // Called.
}

Open in new window


If I click near the edge of the button it works and the event handler in code behind gets called.
However, if I click directly on the icon, then the even handler is not called.

Question: What's the right way to get the button to call the event handler even if it is the child icon that is clicked?

Thanks!
0
Tthe problem is when you use a select button on a grid view the order the program is
 For the first click of button

 OrderList -                        Page Load
 CustomerDetail -             page load
 orderList -                        grid_selectedindexChange

 for the second click of button

 OrderList -                        Page Load
 CustomerDetail -             page load
 CustomerDetail -            load form
 orderList -                        grid_selectedindexChange

 Order that is should do


 OrderList -                        Page Load
 orderList -                        grid_selectedindexChange
 CustomerDetail -             page load
 CustomerDetail -            load form

 is there a way to do this


0
public DataSet GetNotStartedSearchCompliance()
        {
            SqlParameter[] param = new SqlParameter[7];
            param[0] = new SqlParameter("@UserName", UserName);
            param[1] = new SqlParameter("@ActID", ActID);
            param[2] = new SqlParameter("@UnitID", UnitID);
            param[3] = new SqlParameter("@Month", Month);
            param[4] = new SqlParameter("@Year", Year);
            param[5] = new SqlParameter("@Search", Search);
            param[6] = new SqlParameter("@CountryID", CountryID);
            return objHelper.GetDataSet("USP_GetNotStarted_Search_ComplianceAssessment", param);
        }
 
Getting the resultset from the procedure and having in a dataset and then directly binding to the Gridview.
When the resultset gives some 200/300 records ,where in the Gridview 10 records per page will be appeared and so we would get 20 pages(for 200 records) which is taking huge amount of time .Any alternate solution like binding only 10 records in the first page and clicking on the second record should fetch another 10 records which will increase our performance.
 
0
I have this view and I am tying to add the genre.Albums in here but the value for it is NULL
GenreMenu.cshtml.

@model IEnumerable<MvcMusicStore.Models.Genre>
<ul id="categories">
    @foreach (var genre in Model)
    {
        <li>@Html.ActionLink(genre.Name, 
                "Browse", "Store", 
                new { Genre = genre.Name }, null)
        </li>
    }
</ul>

Open in new window


// the value for the albums Count needs to appear next to each genre.name.., how to do this?


Meanwhile, I have another View page, that give me what I need "Albums.Count()"

Browse.cshtml
@model MvcMusicStore.Models.Genre
 
@{
    ViewBag.Title = "Browse Albums";
}
 
<div class="genre" >

    <ul id="album-list">
        @foreach (var album in Model.Albums)
        {
            <li>
                <a href="@Url.Action("Details", new { id = album.AlbumId })">
                    <img alt="@album.Title" src="@album.AlbumArtUrl" />
                    <span>@album.Title</span>
                </a>
            </li>
        }
    </ul>
</div>

Open in new window



How Can I extract the value from Albums.Count() and add it to GenreMenu.cshtml page?
thanks
0
in my partial view, I have used some jquery code for submitting my form.but I got this error.
The required anti-forgery form field"__RequestVerificationToken"
is not present. as you see I have added @Html.AntiForgeryToken() in my partial view and as well I have added [ValidateAntiForgeryToken] on my controller. but I got the error again.I have read all of the questions on the internet but they couldn't help me.

@model Dentistry.Areas.ViewModels.UserViewModel

<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
        <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
    </button>
    <h4 class="modal-title custom_align" id="Heading">ویرایش کاربران</h4>

</div>

@if (Model != null && Model.UserId != string.Empty)
{
    <div class="modal-body" id="editModal">
        <form id="#myForm">
          @Html.AntiForgeryToken()
            <div class="form-group">
                @Html.HiddenFor(a => a.UserId)
            </div>
            <div class="form-group">
                <label>نام کاربری</label>
                @Html.TextBoxFor(a => a.UserName, new { @class = "form-control" })
                @Html.ValidationMessageFor(a => a.UserName)
            </div>
            <div class="form-group">
                <label>نام</label>
                @Html.TextBoxFor(a => a.FirstName, new { @class = "form-control" })
                @Html.ValidationMessageFor(a => a.FirstName)
          

Open in new window

0
We are dealing Azure website where we are supposed to use Send Grid for automatic mails triggering in the application.
The problem is - mails are getting triggered at the very first time in a day.If we want to be executed again we need to change the ApI key in the Azure and consuming it again makes works fine.Please help us what might be the issue and how to resolve?
0
On Demand Webinar: Networking for the Cloud Era
LVL 9
On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

I am using the FileUpload control in ASP.NET and I am trying to convert any file uploaded to a TIF into SQL Server. I am currently saving images as memory stream and into an Image data type in my table with no issues. I was asked to save all files(.doc, .txt, .whatever) as .TIFS and Im not sure its possible, but I would think you could save anything as an image but I have no idea how to do this.
Any help would be appreciated.

Thanks
JK
0
how can i print just my information which i am writing?
just my table no other places
0
I would like to learn what I need to prepare for recruiting company - IT only.

Hope some experts can give me some tips and advises

Thank you for all in advance.
0
Hi Guys,

I place the manually created SQL tables on Entity Framework and create relationship , I could do the operations on that table

what about the dynamically created SQL server tables

how to bring the dynamically created tables in EF and how to created the relationship with previous tables and newly created tables
0
Hi,
I am working on sorting in a GridView. It is working, but I have a question that needs EEs' help.

There are about 200 records in the table that spread into 11 pages with paging. A column called "Last Update Date", when I click on the column, either ASC or DESC, the sorting is very strange. For example, it would go like this
01/04/2017
07/17/2017
07/18/2017
09/13/2016
09/13/2016
08/31/2016      
09/14/2016

Can EE give me some directions?  thanks
0
Hi,

When I execute a function that takes maybe between 5-10 minutes in my asp.net application I get the following error message:

Inactivity Timeout

Description: Too much time has passed without sending any data for document.

It all works fine on my developing machine but when I run it in production I get this error. I have set timeout like this in web.config:
<forms cookieless="UseCookies" defaultUrl="~/Default.aspx" domain="" enableCrossAppRedirects="false" loginUrl="~/Login" name=".ASPXAUTH" path="/" protection="All" requireSSL="false" slidingExpiration="true" timeout="1440" />

Open in new window


Does someone have a suggestion how to solve it?

Peter
0

ASP.NET

123K

Solutions

28K

Contributors

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