javascript-confirm via C# code?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Daniel Gustafsson

    #1

    javascript-confirm via C# code?

    Hmm, when a user presses a button in my web-form I want a javascript alert
    to popup and asking the user to confirm if he wants to perform the action or
    not... I want to be able to do this via C# code (the proper way) instead if
    hacking the html-code.

    I'm guessing this is really simple but I'm all new to this so I could need a
    quick pointer.


  • Ravikanth[MVP]

    #2
    javascript-confirm via C# code?

    Hi

    Yes, this is the only way to show confirm message.

    Ravikanth[MVP]

    [color=blue]
    >-----Original Message-----
    >Hmm, when a user presses a button in my web-form I want[/color]
    a javascript alert[color=blue]
    >to popup and asking the user to confirm if he wants to[/color]
    perform the action or[color=blue]
    >not... I want to be able to do this via C# code (the[/color]
    proper way) instead if[color=blue]
    >hacking the html-code.
    >
    >I'm guessing this is really simple but I'm all new to[/color]
    this so I could need a[color=blue]
    >quick pointer.
    >
    >
    >.
    >[/color]

    Comment

    • Daniel Gustafsson

      #3
      Re: javascript-confirm via C# code?

      Solved it...


      "Daniel Gustafsson" <daniel@phoswor ks.se> wrote in message
      news:OtsxOcyWDH A.388@TK2MSFTNG P10.phx.gbl...[color=blue]
      > Hmm, when a user presses a button in my web-form I want a javascript alert
      > to popup and asking the user to confirm if he wants to perform the action[/color]
      or[color=blue]
      > not... I want to be able to do this via C# code (the proper way) instead[/color]
      if[color=blue]
      > hacking the html-code.
      >
      > I'm guessing this is really simple but I'm all new to this so I could need[/color]
      a[color=blue]
      > quick pointer.
      >
      >[/color]


      Comment

      • Ignacio Machin

        #4
        Re: javascript-confirm via C# code?

        Hi,

        Well, in tere you are "hacking the html" in certain way cause it's theonly
        way to do that :), using the Attributes what you are setting are the
        attributes of the HTML tag that is generated at render of the server side
        control.

        Cheers,

        --
        Ignacio Machin,
        ignacio.machin AT dot.state.fl.us
        Florida Department Of Transportation


        "Daniel Gustafsson" <daniel@phoswor ks.se> wrote in message
        news:euojrT0WDH A.2284@TK2MSFTN GP10.phx.gbl...[color=blue]
        > Solved it...
        > http://aspnet.4guysfromrolla.com/art...90402-1.2.aspx
        >
        > "Daniel Gustafsson" <daniel@phoswor ks.se> wrote in message
        > news:OtsxOcyWDH A.388@TK2MSFTNG P10.phx.gbl...[color=green]
        > > Hmm, when a user presses a button in my web-form I want a javascript[/color][/color]
        alert[color=blue][color=green]
        > > to popup and asking the user to confirm if he wants to perform the[/color][/color]
        action[color=blue]
        > or[color=green]
        > > not... I want to be able to do this via C# code (the proper way) instead[/color]
        > if[color=green]
        > > hacking the html-code.
        > >
        > > I'm guessing this is really simple but I'm all new to this so I could[/color][/color]
        need[color=blue]
        > a[color=green]
        > > quick pointer.
        > >
        > >[/color]
        >
        >[/color]


        Comment

        • Daniel Gustafsson

          #5
          Re: javascript-confirm via C# code?

          Yes, but I'm still doing it in c# without having to switch to html mode...
          =)

          "Ignacio Machin" <ignacio.mach in AT dot.state.fl.us > wrote in message
          news:%23Q1EYW1W DHA.2384@TK2MSF TNGP10.phx.gbl. ..[color=blue]
          > Hi,
          >
          > Well, in tere you are "hacking the html" in certain way cause it's[/color]
          theonly[color=blue]
          > way to do that :), using the Attributes what you are setting are the
          > attributes of the HTML tag that is generated at render of the server side
          > control.
          >
          > Cheers,
          >
          > --
          > Ignacio Machin,
          > ignacio.machin AT dot.state.fl.us
          > Florida Department Of Transportation
          >
          >
          > "Daniel Gustafsson" <daniel@phoswor ks.se> wrote in message
          > news:euojrT0WDH A.2284@TK2MSFTN GP10.phx.gbl...[color=green]
          > > Solved it...
          > > http://aspnet.4guysfromrolla.com/art...90402-1.2.aspx
          > >
          > > "Daniel Gustafsson" <daniel@phoswor ks.se> wrote in message
          > > news:OtsxOcyWDH A.388@TK2MSFTNG P10.phx.gbl...[color=darkred]
          > > > Hmm, when a user presses a button in my web-form I want a javascript[/color][/color]
          > alert[color=green][color=darkred]
          > > > to popup and asking the user to confirm if he wants to perform the[/color][/color]
          > action[color=green]
          > > or[color=darkred]
          > > > not... I want to be able to do this via C# code (the proper way)[/color][/color][/color]
          instead[color=blue][color=green]
          > > if[color=darkred]
          > > > hacking the html-code.
          > > >
          > > > I'm guessing this is really simple but I'm all new to this so I could[/color][/color]
          > need[color=green]
          > > a[color=darkred]
          > > > quick pointer.
          > > >
          > > >[/color]
          > >
          > >[/color]
          >
          >[/color]


          Comment

          Working...