Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Nov 16th, 2007, 7:29 AM   #1
JO90
Newbie
 
Join Date: Nov 2007
Posts: 16
Rep Power: 0 JO90 is on a distinguished road
Talking Simple question about assembly

I create a web project,
I added a WebForm.
Is this an Assembly ?


my book says that an assembly consists of ONE or More .dll or .exe Files !
In a window project [if you click ShowHiddenFiles]...you can see a .exe File.
But ....In my WebProject ....Where is the .dll file or the .exe File ?

Last edited by JO90; Nov 16th, 2007 at 7:29 AM. Reason: GOOD
JO90 is offline   Reply With Quote
Old Nov 16th, 2007, 9:13 AM   #2
xavier
Professional Programmer
 
xavier's Avatar
 
Join Date: Oct 2004
Location: .ro
Posts: 371
Rep Power: 4 xavier is on a distinguished road
Send a message via Yahoo to xavier
Re: Simple question about assembly

There is no dll in a WebProject.
If you want to have a dll you have to create a WebApplication. However, in the express edition of VS I don't think it's possible.
__________________
Don't take life too seriously, it's not permanent !
xavier is offline   Reply With Quote
Old Nov 16th, 2007, 10:06 AM   #3
JO90
Newbie
 
Join Date: Nov 2007
Posts: 16
Rep Power: 0 JO90 is on a distinguished road
Cool Re: Simple question about assembly

Quote:
Originally Posted by xavier View Post
There is no dll in a WebProject.
If you want to have a dll you have to create a WebApplication. However, in the express edition of VS I don't think it's possible.



So, in a web site, where can I find assembly info, as I can in a windowproject ?[in the AssemblyInfo File]
JO90 is offline   Reply With Quote
Old Nov 16th, 2007, 10:20 AM   #4
JO90
Newbie
 
Join Date: Nov 2007
Posts: 16
Rep Power: 0 JO90 is on a distinguished road
Cool Re: Simple question about assembly

Quote:
Originally Posted by xavier View Post
There is no dll in a WebProject.
If you want to have a dll you have to create a WebApplication. However, in the express edition of VS I don't think it's possible.


Thanks expert ...for reply
I created a webSite and a WebForm.
The point is that I need to embed resourceFile[called JO.resx] into my WebSite Assembly.
But I do not know what the procedure is.
And then If in a website there is no dll, how can a website be an assembly ?
help!

Last edited by JO90; Nov 16th, 2007 at 10:21 AM. Reason: GO
JO90 is offline   Reply With Quote
Old Nov 16th, 2007, 10:58 PM   #5
xavier
Professional Programmer
 
xavier's Avatar
 
Join Date: Oct 2004
Location: .ro
Posts: 371
Rep Power: 4 xavier is on a distinguished road
Send a message via Yahoo to xavier
Re: Simple question about assembly

In a aspx Page you have the folowing method :
GetLocalResourceObject ( string ResourceName ).ToString ( ); <- used for getting a specific resource out.

And your resource files need to be in App_LocalResources. There you must have the default version like: yourPage.aspx.resx and in separate folders different languages

/en/yourPage.aspx.en.resx
/it/yourPage.aspx.it.resx

A page declaration using Resources looks like this :
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="True"
CodeFile="MyPage.aspx.cs" Inherits="MyPage" meta:resourcekey="PageResource1" %>
And a literal
<asp:Literal ID="litMyLiteral" runat="server" meta:resourcekey="literalUniqueKey">


Also, for precompiling a website look here


The resource files can sit in a separate assembly but I can't help you there, google a bit.
__________________
Don't take life too seriously, it's not permanent !
xavier is offline   Reply With Quote
Old Nov 17th, 2007, 12:26 PM   #6
JO90
Newbie
 
Join Date: Nov 2007
Posts: 16
Rep Power: 0 JO90 is on a distinguished road
Cool Re: Simple question about assembly

Quote:
Originally Posted by xavier View Post
In a aspx Page you have the folowing method :
GetLocalResourceObject ( string ResourceName ).ToString ( ); <- used for getting a specific resource out.

And your resource files need to be in App_LocalResources. There you must have the default version like: yourPage.aspx.resx and in separate folders different languages

/en/yourPage.aspx.en.resx
/it/yourPage.aspx.it.resx

A page declaration using Resources looks like this :
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="True"
CodeFile="MyPage.aspx.cs" Inherits="MyPage" meta:resourcekey="PageResource1" %>
And a literal
<asp:Literal ID="litMyLiteral" runat="server" meta:resourcekey="literalUniqueKey">


Also, for precompiling a website look here


The resource files can sit in a separate assembly but I can't help you there, google a bit.



It works It works !!!
Thanks.



By the way do you know why
this code works:
Dim rr As New ResourceManager("OO_1.JIM", GetType(PAUL).Assembly)

Thread.CurrentThread.CurrentUICulture = New CultureInfo("it-IT")
Response.Write(Me.GetGlobalResourceObject("JIM", "CA"))


whil this code doesn't:
Dim rr As New ResourceManager("OO_1.JIM", GetType(PAUL).Assembly)

Thread.CurrentThread.CurrentUICulture = New CultureInfo("it-IT")
' Response.Write(rr.GetString("CA"))


Regards anyway.
JO90 is offline   Reply With Quote
Old Nov 17th, 2007, 1:57 PM   #7
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Re: Simple question about assembly

Put your code in code tags or icode tags. Your witless infractions (posting in the tutorial section, making double posts, etc.) will add up soon to an automatic ban. I don't think that you deserve that, but I think you need to get your head out of where the sun don't shine. I'm telling you this as a fellow member, not as a moderator.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Nov 18th, 2007, 12:42 AM   #8
xavier
Professional Programmer
 
xavier's Avatar
 
Join Date: Oct 2004
Location: .ro
Posts: 371
Rep Power: 4 xavier is on a distinguished road
Send a message via Yahoo to xavier
Re: Simple question about assembly

Quote:
Originally Posted by JO90 View Post
By the way do you know why
this code works: ...
Nope, told you that it didn't work for me when dealing with an assembly. By the way :
Dim rr As New ResourceManager("OO_1.JIM", GetType(PAUL).Assembly) // you don't need this here.

Thread.CurrentThread.CurrentUICulture = New CultureInfo("it-IT")
Response.Write(Me.GetGlobalResourceObject("JIM", "CA"))
__________________
Don't take life too seriously, it's not permanent !
xavier is offline   Reply With Quote
Old Nov 20th, 2007, 8:30 PM   #9
JO90
Newbie
 
Join Date: Nov 2007
Posts: 16
Rep Power: 0 JO90 is on a distinguished road
Cool Re: Simple question about assembly

Quote:
Originally Posted by xavier View Post
Nope, told you that it didn't work for me when dealing with an assembly. By the way :
Dim rr As New ResourceManager("OO_1.JIM", GetType(PAUL).Assembly) // you don't need this here.

Thread.CurrentThread.CurrentUICulture = New CultureInfo("it-IT")
Response.Write(Me.GetGlobalResourceObject("JIM", "CA"))

Thanks.


New simple question, since I am sure you know its answer.
I need to write an Arabic version of a WebForm.
What is the code to programmatically change the Orientation of strings in the whole Document,......or at least in DropDownList and TextBoxes and Labels.(in a web Application ont a Windows one.)

I need to programmatically change...

Regards and thanks
JO90 is offline   Reply With Quote
Old Nov 20th, 2007, 10:16 PM   #10
xavier
Professional Programmer
 
xavier's Avatar
 
Join Date: Oct 2004
Location: .ro
Posts: 371
Rep Power: 4 xavier is on a distinguished road
Send a message via Yahoo to xavier
Re: Simple question about assembly

http://msdn2.microsoft.com/en-us/lib...tt(VS.71).aspx here are some explanations.
__________________
Don't take life too seriously, it's not permanent !
xavier is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple question about Assembly JO90 ASP.NET 2 Nov 15th, 2007 7:29 AM
quick assembly question jbo423 Assembly 4 Nov 12th, 2007 7:21 AM
Simple c# question nez C# 8 Jul 1st, 2005 6:29 PM
Simple (stupid cause I don't know it) basic question massive-war C++ 17 Apr 11th, 2005 11:03 PM
Simple Writing to Files. Newbie Question kiaran C++ 1 Feb 8th, 2005 3:22 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:42 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC