Home
Contact
Blog
Articles on this page...
Archives
<
February 2012
>
Sun
Mon
Tue
Wed
Thu
Fri
Sat
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
1
2
3
4
5
6
7
8
9
10
Aggregation:
Categories
Blogging (2)
Development (10)
Hardware (7)
MySQL (3)
Server Administration (2)
SSD (2)
Storis (1)
UniData (1)
Virtualization (1)
Windows 7 (5)
Windows Mobile (1)
October, 2009 (2)
June, 2009 (2)
May, 2009 (3)
March, 2009 (4)
February, 2009 (3)
December, 2008 (4)
November, 2008 (4)
Blogging
Development
Hardware
MySQL
Server Administration
SSD
Storis
UniData
Virtualization
Windows 7
Windows Mobile
Blogroll
Scott Hanselman
Pick a theme:
BlogXP
business
calmBlue
Candid Blue
Continuum
dasBlog
dasblogger
dasblueblog
dasEmerald
DirectionalRedux
Discreet Blog Blue
Elegante
essence
Just Html
MadsSimple
Mobile
Mono
Movable Radio Blue
Movable Radio Heat
nautica022
orangeCream
Portal
Project84
Project84Grass
Slate
Sound Waves
Tricoleur
useit.com
Voidclass2
Sign In
Wednesday, May 06, 2009
« Escape MySQL Queries in .NET (C#)
|
Main
|
MySQL ODBC Slow - Caused by Nod32 4.0 »
Edit Text in a .NET Assembly
I have a client that needed a text change made in an asp.net web app. Should be easy, right? The problem is that it's an old app, the text was hard-coded in the VB, and the source code is long gone! So how do you edit text that is already in a .NET DLL?
.NET Reflector
to the Rescue!
Get
.NET Reflector
and install it.
Use .NET Reflector to open your assembly.
Expand your assembly, and look for the class that represents the page you would like to edit. In my case it was "viewprintnotice", which represented "viewprintnotice.vb".
Expand that class and click the method you guess the text was set in. I guessed Page_Load.
Right click it and Disassemble.
Did you find the code where the value was set? If so, take note. If not, keep digging until you find it. You can't make the change here, though. To actually edit, you need a plug-in.
Download
Reflexil
.
Install it.
Close .NET Reflector (this step may not be necessary, actually)
Drop its files into the .NET Reflector directory.
Open .NET Reflector.
View > Add-Ins.
Choose Add, and double-click Reflexil.dll.
Enable Reflexil by going to Tools > Reflexil.
Navigate back to your assembly's class's method that set the text.
Find it under Reflexil's Instructions tab. This may take a bit of digging.
Right-click the instruction, click edit, and make your changes. Update your changes.
Navigate to your dll and click it.
Reflexil will let you save it!
Save it and drop it into your server's bin directory and you've made your text edit.
Take a shower because what you just did was dirty.
Development
Wednesday, May 06, 2009 4:50:11 PM (Central Daylight Time, UTC-05:00)
Comments [0]
Related posts:
PLINQO is the best way to use LINQ to SQL
Baskin Robbins I Fixed Your Logo For You
Remote Desktop Connection Does Not Remember Window Size or Position
MySQL ODBC Slow - Caused by Nod32 4.0
Escape MySQL Queries in .NET (C#)
How To Get Storis / UniData Data From a C# .Net Application (or just about anything) via ODBC in Windows
All comments require the approval of the site owner before being displayed.
Name
E-mail
Home page
Remember Me
Comment (Some html is allowed:
a@href@title, b, blockquote@cite, em, i, strike, strong, sub, sup, u
) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.
Enter the code shown (prevents robots):
Live Comment Preview
Copyright © 1998 - 2008, Continuum Concepts, LLC.
Phone: (214) 564-2608. Fax: (435) 304-1859. Email:
chris@continuumconcepts.com