change command to open a url instead of a user control

L

lionel luo

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 ();
}
 
G

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 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");
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,998
Latest member
MarissaEub

Latest Threads

Top