Hi All,
I have an html button on .aspx page.
<INPUT class="sbttn" id="btnComplete 0" onclick="onComp lete
()" type="button" value="Mark Completed"
name="btnComple te0">
When the user clicks on the html button the OnComplete
function is called.
<script language="javas cript">
function onComplete()
{
// Client side code
// Clicking the server control via code
WorkItemForm.bt nComplete.click ();
}
</script>
I need to perform some server side functinality whenever
user clicks the html button. So I place a hidden server
control (id = btnComplete) on the .aspx page. In the
client side code I automatically click the server control
( WorkItemForm.bt nComplete.click ();).
On the click event of hidden server control, I write the
server side code in .aspx.cs page.
// Code in .aspx.cs page
private void btnComplete_Cli ck(object sender,
System.EventArg s e)
{
// Calling Server Side Code
}
I am using btnComplete server control as an intermediate
to perform server side functionality.
Problem:
I want to get rid of server control.
Is there a way to perform server side functionality
directly without using server control.
I tried document.FormNa me.Submit();
This doesn't work. Is there some other way to do so?
Thanks & Regards,
-Reetu
I have an html button on .aspx page.
<INPUT class="sbttn" id="btnComplete 0" onclick="onComp lete
()" type="button" value="Mark Completed"
name="btnComple te0">
When the user clicks on the html button the OnComplete
function is called.
<script language="javas cript">
function onComplete()
{
// Client side code
// Clicking the server control via code
WorkItemForm.bt nComplete.click ();
}
</script>
I need to perform some server side functinality whenever
user clicks the html button. So I place a hidden server
control (id = btnComplete) on the .aspx page. In the
client side code I automatically click the server control
( WorkItemForm.bt nComplete.click ();).
On the click event of hidden server control, I write the
server side code in .aspx.cs page.
// Code in .aspx.cs page
private void btnComplete_Cli ck(object sender,
System.EventArg s e)
{
// Calling Server Side Code
}
I am using btnComplete server control as an intermediate
to perform server side functionality.
Problem:
I want to get rid of server control.
Is there a way to perform server side functionality
directly without using server control.
I tried document.FormNa me.Submit();
This doesn't work. Is there some other way to do so?
Thanks & Regards,
-Reetu
Comment