No but that wouldn't change anything as the button isn't calling the function that would write to a label or call another function. The text was just to test if it was calling the function.
Doesn't matter anyways I solved it. Basically in short I had the button inside a html form which was inside the asp form that has runat=server which i didn't realise.
User Profile
Collapse
-
Need some help with an ASP.NET button - C#
Hi, I have a page with a button on it, the button is created using the button control...
<asp:button id="btnAdd" onClick="Button Click" runat="server" text="Add" />
I also have a function in the code behind...
public void ButtonClick(obj ect o, EventArgs e)
{
Response.Write( "Clicked!") ;
}
The form tags are in the... -
ASP.NET C# controls help
Hi,
I am dynamically creating a page that contains a table and within that table there is a drop down list and a button. The drop down list and button let the user rate something, so they select the rating from the list and click the button to rate.
I have a function that creates the cells, rows and other control and returns a list of table rows.
My problem is that as everything is dynamically created,... -
Yeah, thats what I'm trying to do. Thanks for pointing me in the right direction. Much appreciated.Leave a comment:
-
I don't think I'm explaining my problem properly. Sorry Ill try again with more relevant names.
Say I'm making an MP3 player simulator. Ill have an Track object and a Player object. I also have Mp3Player which is derived from Player and and Mp3Track which is derived from Track...
class Track
{
public:
string name, artist;
string getName(void) { return name; }
sting getArtist(void)...Leave a comment:
-
Thanks for the speedy reply.
If I add the setName method to derived, won't that kind of defeat the point of having a derived class?
I want to use the setName function in base to set the name of the object2 in derived. Adding the same method to derived will just be duplicating the code, which is what i'm trying to avoid.Leave a comment:
-
Quick inheritance question
Hey, just a quick question about inheritance.
Heres some basic code to try explain...
class base
{
public:
object1 anObj;
void setName(void);
};
void base::setName(v oid) { anObj.giveName( "name"); }
class derived : base
{
public:
object2 anObj;
};
Ok so object1 and object2 both... -
Thanks for the quick reply. They are all public. I basically want an integer specified in the base class that both classes can access. So like a function in the base class might set it to 1, then a function in the derived class may set it to 5, then a function in the base class may read it, perform a calculation and set it to 3 etc..Leave a comment:
-
Inheritance Problems
Hey,
I'm kind of new to C++ and having some problems with inheritance. I've tried looking everywhere for some help, but I'm not too sure what to ask so please any input will be greatly appreciated. (Please let me no if I start talking rubbish too)
Basically I have my base class with 3 functions and two global integers. I also have a derived class which overrides two of the base class functions.
When I...
No activity results to display
Show More
Leave a comment: