How to read resource file data form javascript?

792 views
Skip to first unread message

chandan

unread,
Dec 31, 2007, 4:46:33 AM12/31/07
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Hi,
How can I show that message in alert code ( in java script) that
pick the data form resouse .rex file .

Thanks in advance.
Chandan

Andrew Badera

unread,
Dec 31, 2007, 5:39:19 AM12/31/07
to DotNetDe...@googlegroups.com
JavaScript is client side. Resource (resx) files are server side. You need to pull out the value from the resource file using ASP.NET code on the server side and somehow make it available to your JavaScript code on the client side. I'll leave the implementation to you -- it's a pretty standard thing, moving bits of server side data to the client side.

--Andrew Badera

chandan

unread,
Dec 31, 2007, 5:44:43 AM12/31/07
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Thanks Andrew!

On Dec 31, 3:39 pm, "Andrew Badera" <and...@badera.us> wrote:
> JavaScript is client side. Resource (resx) files are server side. You need
> to pull out the value from the resource file using ASP.NET code on the
> server side and somehow make it available to your JavaScript code on the
> client side. I'll leave the implementation to you -- it's a pretty standard
> thing, moving bits of server side data to the client side.
>
> --Andrew Badera
>
> On 12/31/07, chandan <ck.kis...@gmail.com> wrote:
>
>
>
>
>
> > Hi,
> > How can I show that message in alert code ( in java script)  that
> > pick the data form resouse .rex file .
>
> > Thanks in advance.
> > Chandan- Hide quoted text -
>
> - Show quoted text -

Cerebrus

unread,
Dec 31, 2007, 6:32:11 AM12/31/07
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
A hidden field (HtmlInputHidden) would be a perfect candidate for this
scenario. Populate it with the values at Page_Load and read the values
in Client javascript.

On Dec 31, 3:39 pm, "Andrew Badera" <and...@badera.us> wrote:
> JavaScript is client side. Resource (resx) files are server side. You need
> to pull out the value from the resource file using ASP.NET code on the
> server side and somehow make it available to your JavaScript code on the
> client side. I'll leave the implementation to you -- it's a pretty standard
> thing, moving bits of server side data to the client side.
>
> --Andrew Badera
>
> On 12/31/07, chandan <ck.kis...@gmail.com> wrote:
>
>
>
>
>
> > Hi,
> > How can I show that message in alert code ( in java script)  that
> > pick the data form resouse .rex file .
>
> > Thanks in advance.
Reply all
Reply to author
Forward
0 new messages