Asp

  • Thread starter Thread starter Ntumu Siwedi
  • Start date Start date
N

Ntumu Siwedi

how do i include text in this line below????
something like Message "succesful" or " Failed "


<uc1:ucPageMessage ID="ucPageMessageDisplay" runat="server" />


in the button

public void btnOk_Click(object sender, EventArgs e)

{
if (StagingUnitStandards.Import(visionUnitStandardNr) == 0)
{
Response.Write("Import Successfull");
}
else
{
Response.Write("Import Failed");
}
}
 
Ntumu said:
how do i include text in this line below????
something like Message "succesful" or " Failed "


<uc1:ucPageMessage ID="ucPageMessageDisplay" runat="server" />


in the button

public void btnOk_Click(object sender, EventArgs e)

{
if (StagingUnitStandards.Import(visionUnitStandardNr) == 0)
{
Response.Write("Import Successfull");
}
else
{
Response.Write("Import Failed");
}
}

You can place a Label on the form and use the Label.Text to display a
message to the user, clearing the Label.Text as needed.

Or you can go to the HTML Button on the ASP.NET page, using the button's
client-side HTML click-event and tie the click-event to a JavaScript
function that has an Alert("some text"), which will pop-up a messagebox
to the user.
 
Back
Top