R
Reetu
Hi All,
I have an html button on .aspx page.
<INPUT class="sbttn" id="btnComplete0" onclick="onComplete
()" type="button" value="Mark Completed"
name="btnComplete0">
When the user clicks on the html button the OnComplete
function is called.
<script language="javascript">
function onComplete()
{
// Client side code
// Clicking the server control via code
WorkItemForm.btnComplete.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.btnComplete.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_Click(object sender,
System.EventArgs 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.FormName.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="btnComplete0" onclick="onComplete
()" type="button" value="Mark Completed"
name="btnComplete0">
When the user clicks on the html button the OnComplete
function is called.
<script language="javascript">
function onComplete()
{
// Client side code
// Clicking the server control via code
WorkItemForm.btnComplete.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.btnComplete.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_Click(object sender,
System.EventArgs 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.FormName.Submit();
This doesn't work. Is there some other way to do so?
Thanks & Regards,
-Reetu