Click here to Skip to main content
15,891,513 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionwhy I am getting this error? Pin
Jassim Rahma28-Mar-12 20:14
Jassim Rahma28-Mar-12 20:14 
AnswerRe: why I am getting this error? Pin
Dalek Dave28-Mar-12 22:30
professionalDalek Dave28-Mar-12 22:30 
AnswerRe: why I am getting this error? Pin
ZurdoDev30-Mar-12 4:27
professionalZurdoDev30-Mar-12 4:27 
QuestionPlacing C# into an ASP.net Form Pin
Paul Harsent28-Mar-12 5:02
Paul Harsent28-Mar-12 5:02 
AnswerRe: Placing C# into an ASP.net Form Pin
Ali Al Omairi(Abu AlHassan)28-Mar-12 5:40
professionalAli Al Omairi(Abu AlHassan)28-Mar-12 5:40 
GeneralRe: Placing C# into an ASP.net Form Pin
Paul Harsent28-Mar-12 8:28
Paul Harsent28-Mar-12 8:28 
GeneralRe: Placing C# into an ASP.net Form Pin
Ali Al Omairi(Abu AlHassan)28-Mar-12 11:02
professionalAli Al Omairi(Abu AlHassan)28-Mar-12 11:02 
GeneralRe: Placing C# into an ASP.net Form Pin
Paul Harsent29-Mar-12 0:03
Paul Harsent29-Mar-12 0:03 
The object is been declared from the View when it is brought in from the model.

I can access the item.price object from outside the , it might just be a basic miss understanding.

value="50.00" I would like to be able to have value= <%item.price>% or something similar.

Thanks

HTML
<% foreach (var item in Model) { %>

    <tr>
        <td>
          <%= Html.Encode(item.Id)%>
        </td>
        <td>
            <%= Html.Encode(String.Format("{0:F}", item.Name))%>
        </td>
        <td>
            <%= Html.Encode(item.Description) %>
        </td>
        <td>
            <%= Html.Encode(String.Format("{0:F}", item.Price)) %>
        </td>

          <%if (Roles.IsUserInRole("FullMember") == false)
          {%>
           <td>
        <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" target="paypal">

            <input type="hidden" name="cmd" value="_cart">
            <input type="hidden" name="add" value="2">

            <input type="hidden" name="business" value="Hull Press">
            <input type="hidden" name="item_name" value="Full Membership">

            <input type="hidden" name="amount" value="50.00">
            <input type="hidden" name="shipping" value="1.00">

            <input type="hidden" name="shopping_url"
                value="http://localhost:30524/Membership/SuccessfulMembership">
            <input type="hidden" name="return" value="http://localhost:30524/Membership/SuccessfulMembership">

            <input type="hidden" name="cancel_return" value="http://localhost:30524/Membership/CancelledMembership">
            <input type="hidden" name="bn" value="PP-ShopCartBF:x-click-but22.gif:NonHosted">

            <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but22.gif" border="0"
                name="submit" alt="Make payments with PayPal - it's fast, free and secure!">

            <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1"
                height="1">
        </form>
            </td>
        <%}
          else
          { %>
          <td>
          <%=Html.ActionLink("Read", "ViewItem", "item", new {itemID = item.Id,itemName = item.Name, itemDescription = item.Description, itemFullArt = item.FullArt, itemPrice = item.Price }, null)%>
          </td>
          <%} %>

GeneralRe: Placing C# into an ASP.net Form Pin
Ali Al Omairi(Abu AlHassan)29-Mar-12 3:00
professionalAli Al Omairi(Abu AlHassan)29-Mar-12 3:00 
AnswerRe: Placing C# into an ASP.net Form Pin
Syed Zoheb Ali Sumair16-Apr-12 6:07
Syed Zoheb Ali Sumair16-Apr-12 6:07 
GeneralConnecting to a Web Service? Pin
helloworld202028-Mar-12 4:57
helloworld202028-Mar-12 4:57 
GeneralRe: Connecting to a Web Service? Pin
Ali Al Omairi(Abu AlHassan)28-Mar-12 5:53
professionalAli Al Omairi(Abu AlHassan)28-Mar-12 5:53 
GeneralRe: Connecting to a Web Service? Pin
helloworld202028-Mar-12 12:59
helloworld202028-Mar-12 12:59 
GeneralRe: Connecting to a Web Service? Pin
Ali Al Omairi(Abu AlHassan)28-Mar-12 23:05
professionalAli Al Omairi(Abu AlHassan)28-Mar-12 23:05 
QuestionRe: Connecting to a Web Service? Pin
ZurdoDev30-Mar-12 4:29
professionalZurdoDev30-Mar-12 4:29 
GeneralRe: Connecting to a Web Service? Pin
RichardGrimmer5-Apr-12 3:49
RichardGrimmer5-Apr-12 3:49 
GeneralRe: Connecting to a Web Service? Pin
helloworld202012-Apr-12 15:42
helloworld202012-Apr-12 15:42 
Questioncheck account gmail? Pin
daitranthanhhoa27-Mar-12 22:34
daitranthanhhoa27-Mar-12 22:34 
AnswerRe: check account gmail? Pin
Not Active28-Mar-12 2:53
mentorNot Active28-Mar-12 2:53 
QuestionUrl Rewriting / Vanity url Pin
aroonthapa27-Mar-12 19:36
aroonthapa27-Mar-12 19:36 
Questionasp.net Pin
mla997427-Mar-12 17:57
mla997427-Mar-12 17:57 
AnswerRe: asp.net Pin
Not Active28-Mar-12 2:52
mentorNot Active28-Mar-12 2:52 
AnswerRe: asp.net Pin
Syed Zoheb Ali Sumair16-Apr-12 6:10
Syed Zoheb Ali Sumair16-Apr-12 6:10 
QuestionCountdown timer with updatepanel Pin
treuveni26-Mar-12 20:09
treuveni26-Mar-12 20:09 
AnswerRe: Countdown timer with updatepanel Pin
Joshua Omundson27-Mar-12 6:00
Joshua Omundson27-Mar-12 6:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.