darma teja

darma teja

  • NA
  • 496
  • 336.9k

On click event to asp:Literal button

Mar 3 2015 5:25 AM
Hi All,

I have an asp:Literal in my aspx page.

<asp:Literal ID="testbtn" runat="server"></asp:Literal>

In c# code, I have added a button to above "testbtn" and wrote a click event in javascript(this event shows a form).


  testbtn.Text = String.Concat
                            (
                                "<input id=\"btnT\" type=\"button\" value=\"",
                                "SHOW", "\" ",
                                "class=\"input\" style=\"cursor:pointer;\" onclick=\"javascriptFunctionName" />"
                            );


Now I want to add one more functionality to this click event. That means, when user clicks this button I have to save an empty txt file to relative  path in my local system.

How can I do it?


Advance thanks,
Darma


Answers (2)