button link situation

Discussion in 'ASP .Net' started by Daves, Apr 29, 2005.

  1. Daves

    Daves Guest

    I'd like to have a button on page A to open a FormView on page B... and in
    Insert mode! How can I do that?
    Daves, Apr 29, 2005
    #1
    1. Advertising

  2. Patrick Olurotimi Ige, Apr 29, 2005
    #2
    1. Advertising

  3. Daves

    Daves Guest

    hmm... there is a button link (or even href link) on aspx page A
    Then I have a FormView with ItemTemplate and InsertTemplate on aspx Page B

    normally I'd do a button with command="Insert" in the ItemTemplate but I'd
    like to be able to press that button on page A to go directly to Page B's
    Formview and in Insert mode...



    "Patrick Olurotimi Ige" <> wrote in message
    news:...
    > Can't get what u really want to do!
    >
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    Daves, Apr 29, 2005
    #3
  4. Daves

    Guest

    Your question certainly isn't very clear but I'll assume that you can
    place page B into "insert mode" if you pass the appropriate parameter
    to it in your querystring. Also, I'll assume that you want to open
    page B in another window. You simply need to add a javascript (client
    side) event handler to the button and you should be fine.

    Protected WithEvents btOpenPageB As HtmlInputButton 'this is the
    declaration for your button on page A

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
    System.EventArgs) Handles MyBase.Load

    btOpenPageB.Attributes.Add("onclick",
    "javascript:window.open('pageB?mode=insert','newwindow');")

    End Sub

    I hope this helps.

    Bill E.
    , Apr 29, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Diogenes Dilone

    Funky error Situation

    Diogenes Dilone, Jan 6, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    514
    Diogenes Dilone
    Jan 7, 2004
  2. Hai Nguyen

    Have you seen this situation?

    Hai Nguyen, Feb 4, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    306
    Hermit Dave
    Feb 4, 2004
  3. .Net Newbie
    Replies:
    0
    Views:
    456
    .Net Newbie
    Jul 29, 2004
  4. Kevin Spencer

    Re: Link Link Link DANGER WILL ROBINSON!!!

    Kevin Spencer, May 17, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    795
    Kevin Spencer
    May 17, 2005
  5. Suzanne

    Problems with Link Button and Button web controls

    Suzanne, Dec 3, 2003, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    148
    Suzanne
    Dec 3, 2003
Loading...

Share This Page