473,385 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

change command to open a url instead of a user control

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 ();
}
May 20 '07 #1
1 1100
On May 20, 7:16 pm, "lionel luo" <lionel...@gmail.comwrote:
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");

May 20 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Tom | last post by:
I want to open a recordset object on an .asp page. When I open the recordset I would like to use a stored procedure that expects a parameter to be passed for the stored procedure. I will then use...
18
by: Roger Withnell | last post by:
I open a new window from the current window to display maps. Several maps of different sizes can be displayed. The function is given the size of the map and adjusts the window size accordingly....
13
by: Andrew | last post by:
I use conditional compiler constants, set through the VBA IDE in Tools, <projectname> Properties, that I refer to throughout my code to control which code is used during development, and which...
9
by: Melissa | last post by:
What is the code to delete a command button from a form? Can the code be run from the click event of the button to be deleted? Thanks! Melissa
7
by: John Walker | last post by:
Hi, In order to have my application give the best performance, I'm trying to design my ASP.NET page where I will only have to populate my DataReader once. It is a simple application where we...
14
by: Kevin | last post by:
A couple of easy questions here hopefully. I've been working on two different database projects which make use of multiple forms. 1. Where's the best/recommended placement for command buttons...
4
by: John Smith | last post by:
I have a continuous form. there is a command button with the following code for the OnClick event: DoCmd.OpenForm "frmPlants", , , "PlantsID =" & Me!PlantsID I click the button and frmPlants...
10
by: jimmy | last post by:
Hi again, sorry for posting two questions so close together but im working on a school project which is due in soon and running into some difficulties implementing the database parts. I have the...
8
by: mlwerth | last post by:
Dear Access Group: This is the most basic and most embarrassing of questions, but I cannot find where to change the data type of a text field that I have in Access 2003 to a number field. I've...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.