change command to open a url instead of a user control

Discussion in 'ASP .Net' started by lionel luo, May 20, 2007.

  1. lionel luo

    lionel luo Guest

    Hi, I have a user control and now it's when user click the the control
    image, will open a feedback form, I want to change to open a url instead,
    how to modify protected void IconButtonFeedback_Command procedue so it will
    open a www.msn.com page? Thanks...

    Code:
    private IconButton __BuildControlIconButtonFeedback ()
    {
    IconButton iconButton1 = new IconButton ();
    base.IconButtonFeedback = iconButton1;
    iconButton1.SkinID = "LeftMenuFeedback";
    iconButton1.ApplyStyleSheetSkin (this.Page);
    iconButton1.ID = "IconButtonFeedback";
    iconButton1.Text = Convert.ToString (base.GetLocalResourceObject
    ("IconButtonFeedback.Text"), ((IFormatProvider)
    CultureInfo.CurrentCulture));
    ((IAttributeAccessor) iconButton1).SetAttribute ("ContextHelp",
    Convert.ToString (base.GetLocalResourceObject
    ("IconButtonFeedback.ContextHelp"), ((IFormatProvider)
    CultureInfo.CurrentCulture)));
    iconButton1.Command += new CommandEventHandler
    (base.IconButtonFeedback_Command);
    return iconButton1;
    }

    protected void IconButtonFeedback_Command (object sender, CommandEventArgs
    e)
    {
    this.FeedbackControl1.ShowFeedbackForm ();
    }
     
    lionel luo, May 20, 2007
    #1
    1. Advertising

  2. On May 20, 7:16 pm, "lionel luo" <> wrote:
    > Hi, I have a user control and now it's when user click the the control
    > image, will open a feedback form, I want to change to open a url instead,
    > how to modify protected void IconButtonFeedback_Command procedue so it will
    > open awww.msn.compage? Thanks...
    >
    > Code:
    > private IconButton __BuildControlIconButtonFeedback ()
    > {
    > IconButton iconButton1 = new IconButton ();
    > base.IconButtonFeedback = iconButton1;
    > iconButton1.SkinID = "LeftMenuFeedback";
    > iconButton1.ApplyStyleSheetSkin (this.Page);
    > iconButton1.ID = "IconButtonFeedback";
    > iconButton1.Text = Convert.ToString (base.GetLocalResourceObject
    > ("IconButtonFeedback.Text"), ((IFormatProvider)
    > CultureInfo.CurrentCulture));
    > ((IAttributeAccessor) iconButton1).SetAttribute ("ContextHelp",
    > Convert.ToString (base.GetLocalResourceObject
    > ("IconButtonFeedback.ContextHelp"), ((IFormatProvider)
    > CultureInfo.CurrentCulture)));
    > iconButton1.Command += new CommandEventHandler
    > (base.IconButtonFeedback_Command);
    > return iconButton1;
    > }
    >
    > protected void IconButtonFeedback_Command (object sender, CommandEventArgs
    > e)
    > {
    > this.FeedbackControl1.ShowFeedbackForm ();
    > }


    Response.Redirect("http://www.msn.com");
     
    Alexey Smirnov, May 20, 2007
    #2
    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. =?Utf-8?B?REo=?=
    Replies:
    2
    Views:
    479
    =?Utf-8?B?REo=?=
    Dec 1, 2005
  2. Mad Scientist Jr
    Replies:
    0
    Views:
    659
    Mad Scientist Jr
    Mar 22, 2006
  3. Replies:
    3
    Views:
    816
    Guillermo
    Apr 26, 2007
  4. Jonathan Wood

    User Control to Control Other User Control

    Jonathan Wood, Jan 24, 2010, in forum: ASP .Net
    Replies:
    4
    Views:
    566
    Jonathan Wood
    Feb 2, 2010
  5. David W. Deley
    Replies:
    1
    Views:
    120
    Martin Honnen
    Jun 29, 2004
Loading...

Share This Page