Results 1 to 7 of 7

Thread: Input type="image" asp.net

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2003
    Posts
    232

    Input type="image" asp.net

    i am trying to make an image a submit button. I know in asp this works if you do input type="image" it doesnt seem to submit the form when i try this in asp.NET.
    Any ideas why?
    What am i doing wrong?

  2. #2
    PowerPoster
    Join Date
    Nov 2001
    Location
    Trying to reach and stay in the cloud
    Posts
    2,089

    Re: Input type="image" asp.net

    Use the Image Button from the Toolbox.

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Input type="image" asp.net

    Have you placed it in your form correctly?

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Jul 2003
    Posts
    232

    Re: Input type="image" asp.net

    I think i did.
    i made the form runat="server".
    My question is how do i tell it to submit the form?
    When its clicked it calls the onClick event in the .vb code so how do i submit the form at that point?

  5. #5
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Input type="image" asp.net

    The concept of submission is somewhat redundant with the use of server side controls. You can simply place the code you want to run (when the form is submitted) in the image's click event (codebehind)

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Jul 2003
    Posts
    232

    Re: Input type="image" asp.net

    I am trying to submit to a page that already exists, so i cant really do that.
    So what you are telling me is that in .NET there is no way to make an image a submit button????

  7. #7
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Input type="image" asp.net

    There is. In this case, you can place "document.form.submit()" in the image's onClick event.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width