Exact loction / Code to remove Price feature.

Last post 06-27-2009 6:10 AM by Greengrass001. 7 replies.

Sort Posts:

  • Exact loction / Code to remove Price feature.

    08-12-2006, 2:55 AM
    • Contributor
      3,017 point Contributor
    • paggy4u
    • Member since 05-19-2004, 7:29 AM
    • Posts 774
    Hello,

    I want to remove the PRICE feature from my classified kit.

    I understand that making  the table field NULL is not the only option.

    Can any one guide me, the exact locations from where i should delete this feature.

    Thanks
    Paggy4u
    -----------------------------------------
    Working with Dynamic Languages
  • Re: Exact loction / Code to remove Price feature.

    08-12-2006, 3:11 PM
    • Member
      695 point Member
    • justin0501
    • Member since 01-18-2006, 2:00 PM
    • Posts 138
    I'm not too positive as I would have to look at it but I would guess would be to allow nulls and to remove any required field validators for the price. There is also a search feature by price which you may not want if you are going to get rid of the price field.
  • Re: Exact loction / Code to remove Price feature.

    08-12-2006, 3:14 PM
    • Member
      695 point Member
    • justin0501
    • Member since 01-18-2006, 2:00 PM
    • Posts 138

    You may also want to check out the following as someone else had the same question. After reading this post I am assuming there is more to it than what I had mentioned:

    http://forums.asp.net/thread/1323621.aspx

  • Re: Exact loction / Code to remove Price feature.

    08-12-2006, 10:36 PM
    • Contributor
      3,017 point Contributor
    • paggy4u
    • Member since 05-19-2004, 7:29 AM
    • Posts 774
    I am still finding the exact solution.

    I just want it to be removed . My design dos not have any price feature

    Can someone help me please.

    Thanks
    Paggy4u
    -----------------------------------------
    Working with Dynamic Languages
  • Re: Exact loction / Code to remove Price feature.

    09-06-2006, 4:13 PM
    • Member
      535 point Member
    • mattbug
    • Member since 08-30-2006, 7:57 PM
    • New York
    • Posts 146

    In PostAds.aspx and EditAds.aspx...
     change this:

                 <p> 
                  </p>
                  <legend>Price:</legend>$
                  <asp:TextBox Text='<%# Bind("Price", "{0:f2}") %>' runat="server" ID="PriceTextBox"
                   CssClass="post_dollars"></asp:TextBox><asp:CustomValidator ID="PriceValidator" runat="server"
                    ErrorMessage="The Price is not valid." OnServerValidate="PriceValidator_ServerValidate">
                                              *</asp:CustomValidator>
     to this:

                  <!-- Hide the Price TextBox by wrapping it in a span and setting class to "none"
                  <p> 
                  </p>
                  <legend>Price:</legend>$
                  -->
                  <span class="none">
                  <asp:TextBox Text='<%# Bind("Price", "{0:f2}") %>' runat="server" ID="PriceTextBox"
                   CssClass="post_dollars"></asp:TextBox><asp:CustomValidator ID="PriceValidator" runat="server"
                    ErrorMessage="The Price is not valid." OnServerValidate="PriceValidator_ServerValidate">
                                              *</asp:CustomValidator>
                                          </span>
                                         
    In PostAds.aspx.vb...
     add this:

         Protected Sub Page_Load1(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            'Default the Price to 0 to pass validation
            PriceTextBox.Text = 0
         End Sub
                      

    There are several other places that you will have to hide Price (and probably AdType as well) but the changes above should get you started.

  • Re: Exact loction / Code to remove Price feature.

    09-06-2006, 4:17 PM
    • Member
      535 point Member
    • mattbug
    • Member since 08-30-2006, 7:57 PM
    • New York
    • Posts 146
    (Protected Sub Page_Load1 should read Protected Sub Page_Load without the "1")
  • Re: Exact loction / Code to remove Price feature.

    09-07-2006, 11:02 AM
    • Contributor
      3,017 point Contributor
    • paggy4u
    • Member since 05-19-2004, 7:29 AM
    • Posts 774

    Hi, Does any one have a solution where i can show the price as Smile22 only, rather than 22.0000Sad as shown currently.

    I do not like the idea of showing 4 digits after the actual amount. a plain amount just looks good that is 22 or 47 or any thing.

    Price is declared as decimal in some places, what should i change to make it just 22. integer could cause problems i think..?

    Pl. guide me.  

    Thanks in advance 

    Paggy4u
    -----------------------------------------
    Working with Dynamic Languages
  • Re: Exact loction / Code to remove Price feature.

    06-27-2009, 6:10 AM

     I tried changing the codes as suggested, but unfortunately do not work.  Was anyone able to get the suggestion by Mattbug to work?  Or is it just me?  Can anyone help to remove the Price feature?

Page 1 of 1 (8 items)