Its better you create one class in App_code folder and than create instance of calss and than than call method of the class from both web from...that will do for you
Example
put this class in App_code folder
public class Common
{
public void MyFunction()
{
}
}
use this in you webform
web from 1
public class webform1
{
public void myfunctioncall()
{
new Common().MyFunction
}
}
web from 2
public class webform2
{
public void myfunctioncall()
{
new Common().MyFunction
}
}