I Have a Jquery file ("Maestro.js") and a function:
function SetDDLNumbers () {
for (var i = 0; i < 51; i++) {
$('#ContentPlaceHolder3_ShuttersCount').append(new Option(i, i));
$('#ContentPlaceHolder3_CollectedCount').append(new Option(i, i));
$('#ContentPlaceHolder3_ValimCount').append(new Option(i, i));
$('#ContentPlaceHolder3_UCount').append(new Option(i, i));
$('#ContentPlaceHolder3_ShoeingCount').append(new Option(i, i));
$('#ContentPlaceHolder3_EnginCount').append(new Option(i, i));
$('#ContentPlaceHolder3_ProtectedSpaceCount').append(new Option(i, i));
$('#ContentPlaceHolder3_GlassCount').append(new Option(i, i));
$('#ContentPlaceHolder3_BoxesCount').append(new Option(i, i));
}
});
My asp file and the PageLoad function is :
protected void Page_Load(object sender, EventArgs e)
{
GridViewRow row = (GridViewRow)Session["selectedrow"];
int ProjectID = Convert.ToInt32(row.Cells[1].Text);
DBservices db = new DBservices();
DataTable dt = db.GetCustomerInformation(ProjectID);
if (!Page.IsPostBack)
{
SetPageDetails(dt);
SetProjCurrentStatus();
LoadSuppliers();
}
GetOrderStatus();
}
The aspx file is a content page of master page tha contain this line :
<script src="javascript/maestro.js" type="text/javascript"></script>
I want to call the SetDDLNumbers function within the "!Page.IsPostBack" section.
if (!Page.IsPostBack)
{
SetPageDetails(dt);
SetProjCurrentStatus();
LoadSuppliers();
}
When I'm try to wrote : SetDDLNumbers() it show me that that function is not recognized. how can i call this function?