简体   繁体   中英

View ascx.cs files from deployed website?

I've got a website that I published on IIS, but it seems like I've got the wrong version of source code in my dev environment.
I just need the code from 1 ascx.cs file.

Can I get to the contents of an ascx.cs file from a deployed website?

I've tried using .NET Reflector as suggested on other posts, but it seems like this tool only gives me access to my normal classes and not to the .ascx.cs files. Or am I just missing that?

EDIT: Additional information as requested in answers.

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="timesheet.ascx.cs" Inherits="controls_timesheet" %>

You should use the DLL of the compiled web site to get the class that represents your .ascx.cs file.

For example, if your project is called MyWebSiteProject, you should have a MyWebSiteProject.dll on your /bin folder.

Open this DLL with .net Reflector, or http://ilspy.net/ , if your control is named MyUserControl, it should be inside the namespace MyWebSiteProject.

Please double check your project's and controls namespace first.

Hope this helps, good luck :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM