Add file at design-time

I have a CustomWebControl that can be dragged onto a WebForm at design-time.  When the control is added, how can I add a new Resx file to the WebForm?  I think it has something to do with System.Component.Design, and an OnComponentAdded event, but I am not sure how to add the file.
LVL 6
platinumbayAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AerosSagaCommented:
You should not have to add the resx file, when you drag the control onto the .aspx page the IDE handles all of that for you, are you getting a specific error message or debug stack you could share?

Aeros
0
platinumbayAuthor Commented:
No, no bugs. I am building a WebControl and I'm quite sure this is exactly what I want to do.  :)
0
AerosSagaCommented:
so what problem are you having when you run the page does the control show up?  
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

mmarinovCommented:
hi platinumbay,

can you describe your approach? the reason for asking this is :
The resx files are added to the form within windows application, not web application. if you want to localize web forms you have to do it manually - it can not be done automatically

B..M
mmarinov
0
platinumbayAuthor Commented:
MMarinov, very perceptive :), however I am quite sure it can be done.  http://www.winformreports.co.uk/features_loc.htm

I just have a slightly different use for the idea, and I'd rather build it myself.
0
mmarinovCommented:
i haven't try the control, so may be it can be done - but i just don't know how this can be done
sorry

B..M
mmarinov
0
platinumbayAuthor Commented:
Try manually adding a Resx file to a web solution; copy the Default.aspx.resx to Default.aspx.fr-CA.resx, and modify the .vbproj file to add it under the Webform.aspx.vb file.  Then compile.  It should compile a resouce file in a sub bin directory that can be used at runtime.
0
platinumbayAuthor Commented:
I just want to do that programatically.
0
mmarinovCommented:

i see
check this thread :http://www.dotnet247.com/247reference/msgs/37/186087.aspx
i think you can use it

B..M
mmarinov
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
platinumbayAuthor Commented:
Not exactly what I needed, but thanks for trying :)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.