Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1074897
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T21:11:55+00:00 2026-05-16T21:11:55+00:00

Given the form: <form runat=server> **Omitted field data for simplicity** <asp:Button runat=server id=btn_addNewPrice OnClick=newPrice_click

  • 0

Given the form:

<form runat="server">
    **Omitted field data for simplicity**           
    <asp:Button runat="server" id="btn_addNewPrice" OnClick="newPrice_click" Text="Add New Price" />    
</form>

And the code behind:

// A new price has been entered
void newPrice_click(object sender, EventArgs e)
{
    // Get form values
    DateTime frm_datestart = DateTime.Parse(dateStart.Text);
    DateTime frm_dateend = DateTime.Parse(dateEnd.Text);
    double frm_percent = double.Parse(percentage.Text);
}

I get the error:

CS1061: ‘ASP.admin_editproduct_aspx’
does not contain a definition for
‘newPrice_click’ and no extension
method ‘newPrice_click’ accepting a
first argument of type
‘ASP.admin_editproduct_aspx’ could be
found (are you missing a using
directive or an assembly reference?)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T21:11:57+00:00Added an answer on May 16, 2026 at 9:11 pm

    If you put a breakpoint on your code, you can see if the code is hit (the breakpoint gets hit).

    I think you should use an asp:button or implement the postback using the following tuterial:
    http://www.dotnetspider.com/resources/1521-How-call-Postback-from-Javascript.aspx

    edit:
    What i always do, I select the button, go to properties and then on the events tab (lighting symbol) I select the event that I want to use for click, or i double click to make a new one.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this simple code: <html> <body> <form name=f1> <asp:Label name=lbl runat=server Text=Label onclick=lblClick()></asp:Label>
I have this SqlDataSource in my form: <asp:SqlDataSource ID=SqlDataSource1 runat=server ConnectionString=<%$ ConnectionStrings:ConnectionString %> InsertCommand=INSERT
In file data.hex, the data is given in hexadecimal form where the first digit
Given the following HTML form: <form id=myform> Company: <input type=text name=Company value=ACME, INC./> First
Given Two text Boxes. (TextBox1 & TextBox2), I want add two numbers (using the
I've tried both of these: <asp:HiddenField ID = selectedHour runat=server Value=blahblah /> <input type=hidden
Given the following sample form code and CSS stylesheet Form <div class="Center_300 "> <button
basically i have a form with the runat server tag. within this form i
I need to be able to find all grids for a given form. This
I've created two UserControls, a ValidationManager and a ValidationOutput. On a given form there

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.