Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

not hitting a function

Status
Not open for further replies.

Sanjeet1

Programmer
Sep 4, 2003
26
US
I try calling the customvalidator here:
private void Update_Click(object sender, System.EventArgs e)
{
if (!Page.IsValid) //I set a break point here
return;
--
---
--


Here is my fucntion: I set a bbreakpoint and it never hits the function. anysuggestions?

private void WrongeFileUpdate_ServerValidate(object source, System.Web.UI.WebControls.ServerValidateEventArgs args)
{
// Display wrong file message if not correct file is selected

if( _filename != this.FileName.ToString())


{
args.IsValid = false;
}

}
 
Is the menu "build > configuration manager" set to build or debug? just i had same problem and when running the break point always showed a white ? (question mark)and this turned out to be the problem.

Age is a consequence of experience
 
Where do you call your private function as you don't seem to call it in your example?

Also check the scope of your main code, your main code may simply not be seeing the function as its outisde its scope however what looks more like is your not calling that function.

I would create a debug line e.g

WrongeFileUpdate_ServerValidate('whatever the params are');


Now create a breakpoint at the function level so that when you debug you call the function at the above line and then the debugger jumps to the function and breaks at wherever you set it.

Hope that helps,

Cheers,

Fz.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top