CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2008

    Accessing .cs file..

    Hello All,
    I am presently working on a developed website and want to add some functionality to it.

    I have a file called AssetPreview.ascx and the code behind the file as AssetPreview.ascx.cs


    i added something to the ascx file like,

    <a id="test" onclick = "temp()" runat="server" >Click here to download the file</a>

    and so i added the method temp in the AssetPreview.ascx.cs as,

    public void temp(object sender, EventArgs e)
    //some functionality

    Is this is correct way to do this..because when i click that link i am getting an run time error saying

    Microsoft JScript runtime error : Object Expected

    should i do anything else ???

    Can any 1 please help me...

  2. #2
    Join Date
    Sep 2008

    Re: Accessing .cs file..

    Use an ASP.NET HyperLink control instead of <a> tag

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.