ASP.NET

124K

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

Hello Experts,

I'm using asp.net 4.0 charts(ChartType: Bubble). I have X-axis shows States (values like AL, FL, NY,...) and Y-Axis is a Date(01/01/2018,02/01/2018,..) The date range on the Y-axis is from 01/01/2018 to 12/31/2018. One of the X-axis has two Y-Values. For instance NY has 01/01/2010,03/01/2018, I cannot show two DataPoints for 1 X-Axis item. I  tried this and still not working
series.CustomProperties = "IsXAxisQuantitative=True";
 DataPoint dp = new DataPoint();

dp = new DataPoint(i, val);
dp.SetValueY("01/01/2018");
dp.XValue = chart.Series["DateSeries"].Points.Count() * 2;
 dp.ToolTip = "First Date - 01/01/2018";
 chart.Series["DateSeries"].Points.Add(dp); 

dp.SetValueY("03/01/2018");
dp.XValue = chart.Series["DateSeries"].Points.Count() * 2;
 dp.ToolTip = "Second Date - 03/01/2018";
 chart.Series["DateSeries"].Points.Add(dp); 

Open in new window


The above code show only the tooltip twice ( the last one it got set i.e. Second Date - 03/01/2018), but not the two datapoints on Y axis. What I'm missing, please help.

Thanks,
ASPDEV
0
Become a Certified Penetration Testing Engineer
LVL 12
Become a Certified Penetration Testing Engineer

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

Hi
in my asp.net web application
what vb.net code would I use to read the e-mail headers and bodies of all unread emails in my inbox
then Mark each e-mail as read
0
My first ASP.NET Web Forms app.  VB.NET code behind (familiar with VB.NET)
I started my app and have it mostly done.   When I started I just made my own GFview.aspx form and put all my code in there.
I see when I created the app, it threw in it's own "Deafult.aspx" file with a bunch of MS links for ASP sites/info.

I want to clear all that mess out and have it be blank and automatically call my GFview.aspx page.

My questions:

If possible, I would like to put the code in the Default.aspx.vb file/code.  What code do I use?
Public Class _Default
    Inherits Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load

        '  ???   <== Here   ?

    End Sub

End Class

Open in new window


I have no idea what the URL would be of the page I want to call.
When I run it in design mode, the URL is this:  "http://localhost:52405/GFview.aspx"

I don't know much about web based functionality.

I guess the goal I am trying to acheive is removing the junk from the Default.aspx page and have my one page be that one that is used.  I hope that makes sense.

Thanks
1
Hello,

I am trying to call a WCF Service from Jquery.
When i run the application as of now, it goes into error.
All i get is :         XHR: [object Object]

Earlier i was getting CORS issues.
I Included "            "Access-Control-Allow-Origin" under Application_Beginrequest of global.asax file.


Just to make sure the service is working good, I tried calling the service from a server side button control click and it works good and returns the data.
However, when i call it form Jquery, it goes into error and does nothing.

Can you point out what is wrong with this code?  Why is it failing.



Service

namespace EnrSvcOut
{
    // NOTE: If you change the interface name "IService1" here, you must also update the reference to "IService1" in Web.config.
    [ServiceContract]
    public interface IServiceEnrollmentOutcome
    {
        [OperationContract]
        [WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json, UriTemplate = "/GetServicePrograms")]
        List<SvcEnrOutProgram> GetServicePrograms();
    }
    [DataContract]
    public class CompositeType
    {
        bool boolValue = true;
        string stringValue = "Hello ";

        [DataMember]
        public bool BoolValue
        {
            get { return boolValue; }
            set { boolValue = value; }
        }

        [DataMember]
        public string StringValue
        {
            get { return stringValue; }
            set { stringValue = value; }
        }

Open in new window

1
Hello Experts,
I have a Forget Password link in the Login Page.  When clicked, I received an email with a link to Reset the password.  In email, it contains a link, which will take you to the page where you can reset it. The problem is when I click on the link, the page error ed out with the following error message.  Any idea what is going on.  Any idea how to debug the page when loaded directly from the link?  Please let me know if you can.  Thank you in advance.

Thank You!

Server Error in '/' Application.

Object reference not set to an instance of an object.
  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.NullReferenceException: Object reference not set to an instance of an object.

Source Error:
1
Hi

I have been asked to build a solution that saves documents and messages emailed back and forth in Outlook into some sort
of repository that can then be accessed from anywhere. I am looking for suggestions on the best way to do this using Excel/Outlook/Access VBA code, ASP.net webforms  and SQL.

My initial thoughts were to automatically send a copy (CC) message of all Outlook emails to an email address set up specifically for this as a starting point
then either store the documents on the company cloud server or in an ASP.net folder or SQL database.

Thanks
1
Hello Experts,

This issue is concerning an ASP.NET webpage that's currently used in our contact center.
It's a personalized launch page for users, with links they need to do their jobs.
But recently some of the tools used by our colleagues have changed.

The problem is, some links now work faster in IE and some faster in chrome.
And the difference in speed is rather dramatic in some cases.

I need a way to force the individual links to open in the fastest browser.

Many Thanks!
Maurice
1
How do I run an aspx page in debugger to see if JQuery/JavaScripts are auto running every nn seconds in Chrome Browser
1
i have develop Asp.net application With Crystal Report in Visual Stdio 2010...
Application Working Fine in local..
but i public application in IIS server application working fine 1- 2 hours..
after 1 hour application Not Display Crystal Viewer...



Please Help me...
1
Hi,
I am using Renci.SshNet to upload the files over SFTP. Below is my code.

var connectionInfo = new ConnectionInfo(host,
                                    objFI.UserId,
                                    new PasswordAuthenticationMethod(objFI.UserId, objFI.Password),
                                    new PrivateKeyAuthenticationMethod("rsa.key"));
 try
                    {
                        using (SftpClient sftp = new SftpClient(connectionInfo))
                        {
                            try
                            { 
                                    sftp.Connect();
                                    if (sftp.IsConnected)
                                    {
                                        using (var file = File.OpenRead(FilewithUploadingext))
                                        {
                                            if (file != null)
                                            {
                                                sftp.BufferSize = 4 * 1024; // bypass Payload error large files                                                     
                                                sftp.UploadFile(file, Path.GetFileName(FilewithUploadingext), (uploadCallback) =>
                                                {
                                                    ServerFileSize = uploadCallback;
                                                });
                                            }
              

Open in new window

1
Become a CompTIA Certified Healthcare IT Tech
LVL 12
Become a CompTIA Certified Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

Using Reportviewer in a ASP.NET application
Do have FIPS enabled (required)

This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.

Description: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Exception Details: System.InvalidOperationException: This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.
Source Error:
[InvalidOperationException: This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.]
   System.Security.Cryptography.SHA512Managed..ctor() +13053204
   Microsoft.Reporting.WebForms.SelectedIndicies.ComputeValidValuesHash(IEnumerable`1 validValues) +44
   Microsoft.Reporting.WebForms.MultiValidValuesSelector.CreateChildControls() +219
   System.Web.UI.Control.EnsureChildControls() +92
   System.Web.UI.Control.PreRenderRecursiveInternal() +42
   System.Web.UI.Control.PreRenderRecursiveInternal() +160
   System.Web.UI.Control.PreRenderRecursiveInternal() +160
   System.Web.UI.Control.PreRenderRecursiveInternal() +160
   System.Web.UI.Control.PreRenderRecursiveInternal() +160
   System.Web.UI.Control.PreRenderRecursiveInternal() +160
   System.Web.UI.Control.PreRenderRecursiveInternal() +160
   System.Web.UI.Control.PreRenderRecursiveInternal() +160
   …
0
I have a need where I need to get the status of the email which I sent from SendGRID.

I need is there any by which I can  do it without using webhooks.

Our application sends multiple emails to different customers so , I need to get the status for them.
0
Trying to update visual studio 2015 to include xamarin.

However, it keeps getting stuck on Applying: Windows Software Development Kit for Windows Store Apps

For instance, it's now been running 24 hours and is still in the same status it was when I left it yesterday.

I have done a control alt delete into a shutdown (not in hibernate shut down with quick startup, but a true shut down).

And tried it again. Same thing repeatedly after about 5 tries.

I have done a rollback to 2 and then 3 days ago, but my rollbacks always fail. 3 rollbacks and after I restart and work for around 10 minutes, then it indicates the rollback failed.

I have even done the rollback restart and waited without touching anything and it fails.

So there is no rolling back.

however, my VS works fine and I can use it. I just can't install Xamarin.

We have now tried this on two different computers with the exact same results. We are on wired internet Google Fiber  with a download speed of 920 mbps and upload of 909 mbps, so it's not bad internet.

Both computers are nice computers. This one has 32 GB RAM only using 4% cpu and 20% memory. Windows 10 Pro, 64-bit.

Thanks!
0
How to enable Radio Buttons, when a check box is already checked?

i.e On Page load, Check box is loaded with checked condition.

User is not clicking or editing the check box. So, this is not a click function.

In JavaScript Ready function, I am trying to enable or disable the radio buttons based on the checkbox selection condition.


$(document).ready(function () 
{   
  // $("#Other").on("click", function ()
  // {
        if ($("#Other").is(":checked"))
        {   
            $("#OtherYes").prop("disabled", false);
            $("#OtherNo").prop("disabled", false);
        }
        else
        {
            $("#OtherYes").prop("disabled", true);
            $("#OtherNo").prop("disabled", true);

            $("#OtherYes").prop("checked", false);
            $("#OtherNo").prop("checked", false);

        }
    //});
});
   // $("#Other").trigger("click");

Open in new window

0
I have a ASP.Net MVC 5 C# application that uses JWT tokens to GET (request) a token to get access to the database. The issues that I am running into are the c# code for on the IdentityConfig.cs ApplicationUserManger I set the login lockout defaults. Those defaults do not work. I have a MaxFailedAccessAttempts set to 3 when I login with the incorrect password more than 3 times the account does not lockout the user. The user should be locked for 5 minuets (which I don't know if that works because the lockout code is not working). To generate an email which the users gets in their email inbox than click on a link on the email and then takes the user to the password reset page where the password is suppose to be reset by getting a JWT token to GET then PUT the change to update the database table with the new password.
0
I running into a pittfall I have an action that I'm trying to refactor so that it call a service that will populate a model that I created.

 My only issue is that I have a bunch of method that I'm not sure if they should belong to the service or I just should leave them on the controller level. My assumption is to not implement these method in my new service that I will create.  The methods that I'm referring to are as follow:
 PopulateSecurityParameters(parameters, viewModel);
  PopulateCancelSoldParameters(parameters, viewModel);
  PopulateCallLogParameters(parameters, viewModel);

[  private ViewModel GetViewModel(Employee employee)
        {
            var viewModel = new ViewModel();
            var parameters = ParameterConfigurationService.GetParameters();

            viewModel.CommonSmtpSettingsOptions = GetCommonSmtpSettingsOptions();

            viewModel.StatusInfoList = GetStatusInfoList(parameters);

            PopulateSecurityParameters(parameters, viewModel);
            PopulateCancelSoldParameters(parameters, viewModel);
            PopulateCallLogParameters(parameters, viewModel);
            PopulateGeneralParameters(parameters, viewModel);
            PopulateAppointmentCallParameters(parameters, viewModel);
            PopulateSmtpParameters(viewModel);

            viewModel.CountryOptions = GetViewModelCountryOptions(viewModel.SelectedCountry);
            viewModel.QuickNoteOptions = 

Open in new window

0
I have a silverlight app hosted on windows 7 and IIS, it works fine

I'm trying to move to a different box (windows 10) and its not working
I've run fiddler tool and can see the SVC binary requests are not found (404)
As this is a direct copy of the published code, I assume its setup related
If i run the project through visual studio it works fine, but in IIS does not

Here is an example of the url that isn't found on the new box:
http://localhost/MasterUI/ClientBin/MasterUI-Web-GuiViews.svc/binary/GetV_gui_TempAlarmGraph_by_Site?site=0001&ent=FFFFFFFF
The above gives a 404 in fiddler

The previous request to the XAP file works and does NOT 404
http://localhost/MasterUI/ClientBin/MasterUI.xap

I've tried to duplicate the IIS setup as much as possible, but for some reason it isn't working

My solution consists of 2 projects
MasterUI (silverlight stuff here)
MasterUI.Web (this is the non silverlight app - .aspx files)


The windows 10 box is a fresh install, so perhaps i'm missing some components, but as its working in visual studio on this windows 10 box, I assume it's IIS setup related?
0
How to implement role-based security? There are pages that only few people are allowed to see and edit.
Is there any C# example of this?
0
I have a column with check box named "IsActive" and a column with text box named "Comments".
I have a radgrid with a check box column.
When i uncheck the checkbox in edit mode, i want to enable the text box.
 I have the following code and i get
"The name 'chkActive' does not exist in the current context."
How do i access the checkbox within a radgrid?


 <telerik:RadGrid ID="rgClientInfo" runat="server" AutoGenerateColumns="False">
<telerik:GridTemplateColumn UniqueName="IsActive" HeaderText ="IsActive" >
                                            <EditItemTemplate>
                                            <ASP:CheckBox ID="chkActive" runat="server" CssClass="checkbox" Text="IsActive" onclientclick="ActivateCommentsWhenClientInactive()"  />
                                            </EditItemTemplate>   
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn DataField="Comments" HeaderText ="Comments" UniqueName="Comments">
                                            <ItemTemplate>
                                              <ASP:Label ID="lblMemComments" runat="server" Text='<%# Eval("Comments") %>' ToolTip="Member Comments" />
                                            </ItemTemplate>
                                            <EditItemTemplate>
                                            <telerik:RadTextBox runat="server" ID="rtbComments" Text="" Enabled="false" ></telerik:RadTextBox>
                                            

Open in new window

0
CompTIA Cloud+
LVL 12
CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

After successfully inserting a record using the try,,catch.., I 'd like to use a bootstrap call to display the message as shown below.
     try
                {
                    // Do something
                    AppThis.InsertUpdateProduct();
             
            // I'd like to display the message calling a bootstrap alert  saying "Successfully added!"
                     
                }
                catch (Exception ex)
                {
                    // Log 
                    string strErrNum = ex.Message.ToString();

                    // Display message to users

                }

Open in new window

0
Hi,
I am opening a website in Microsoft Visual web developer 2010 express, which worked before but now I'm getting an error

Compilation Error
  Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

 Compiler Error Message: BC30451: 'SiteCode' is not declared. It may be inaccessible due to its protection level.

Source Error:

it highlights the following code
Line 8:          aDb = SiteCode.openDBConnection(aDb)

Open in new window

which is in a file named openDB.vb

I tested the connection and it seems to be working fine....any guidance appreciated. Thanks
0
How to invoke the JavaScript function from code behind (c# / controller)?

In MVC, Controller - I will have to enable or disable the text box in the Controller.

In c#, i will have to fetch the HTML element id.

Then based on the condition result loaded from database, I will have to enable or disable the Textbox element id.

if ($("input:radio[name='RadioButtonSelection']:checked").length > 0) 
{
            var isChecked = document.getElementById("RadioButtonSelectionYes").checked;

            if (isChecked == true)
            {
                document.getElementById('ShowTextBox').disabled = false;
                
            } else if (isChecked == false)
            {
                document.getElementById('ShowTextBox').checked = true;
                document.getElementById('ShowTextBox').disabled = true;
            }
}

Open in new window

0
I have an aspx page with s repeater on it using s hyperlink control or (Link Button).What I intend is to click the control and it would open a  O365 word document which user can start to write.
Also when completing the document, can the document be saved in a sharepoint site?
0
I have several dropdownboxes that require true/false answers but I want to display Select/Yes/No.  I found this function that works:
 
public static List<SelectListItem> SelectListForBoolean()
        {
            var yesOrNoTriState = new List<SelectListItem> {
                new SelectListItem { Text = "- Select -", Value = null },
                new SelectListItem { Text = "Yes", Value = true.ToString() },
                new SelectListItem { Text = "No", Value = false.ToString() }
            };

            return yesOrNoTriState;
        }

Open in new window

but if I don't bind it to the "Create" controller it passes "null" even if Yes or No has been selected. Then, if I do bind it and nothing is selected, my ModelState.IsValid returns false.
What can I do in the situation that I would like to see 3 options (Select/Yes/No) and "Select" is shown by default? I can pass false also when "Select" is select but I need to do which ones have not been answered...
0
I'd like to display my repeater outlook horizontally, meaning it should loop into next column instead of 1 column output.
0

ASP.NET

124K

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