Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   ASP.NET (http://www.programmingforums.org/forum35.html)
-   -   Simple question about assembly (http://www.programmingforums.org/showthread.php?t=14472)

JO90 Nov 16th, 2007 7:29 AM

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 ?:icon_mrgreen:

xavier Nov 16th, 2007 9:13 AM

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.:rolleyes:

JO90 Nov 16th, 2007 10:06 AM

Re: Simple question about assembly
 
Quote:

Originally Posted by xavier (Post 136913)
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.:rolleyes:




So, in a web site, where can I find assembly info, as I can in a windowproject ?[in the AssemblyInfo File]

JO90 Nov 16th, 2007 10:20 AM

Re: Simple question about assembly
 
Quote:

Originally Posted by xavier (Post 136913)
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.:rolleyes:



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!:?:

xavier Nov 16th, 2007 10:58 PM

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.

JO90 Nov 17th, 2007 12:26 PM

Re: Simple question about assembly
 
Quote:

Originally Posted by xavier (Post 136941)
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.
:icon_mrgreen::?:

DaWei Nov 17th, 2007 1:57 PM

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.

xavier Nov 18th, 2007 12:42 AM

Re: Simple question about assembly
 
Quote:

Originally Posted by JO90 (Post 136982)
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"))


JO90 Nov 20th, 2007 8:30 PM

Re: Simple question about assembly
 
Quote:

Originally Posted by xavier (Post 137011)
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:mrgreen:

xavier Nov 20th, 2007 10:16 PM

Re: Simple question about assembly
 
http://msdn2.microsoft.com/en-us/lib...tt(VS.71).aspx here are some explanations.


All times are GMT -5. The time now is 3:49 PM.

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