[Mono-list] Web app migrate from win32 to linux

Travis Staloch twostepted at yahoo.com
Wed Nov 15 14:48:55 EST 2006


Joe,
 
<
This doesn't work on my planet. On my planet you would never put something like that in javascript. ... Putting runat=server in the string of a javascript variable is just cuckoo here on my planet. No offense to other worlds of course ;-), each to his own. 
<

I agree that its not the best form.  Looking back at it now, it looks to me like it shouldn't work. 

Should I report a bug on something like this?

Regards,

--Travis

Joe Audette <joe.audette at gmail.com> wrote: Hi Travis,

<
I really meant (single quotes replaced with double quotes).  ** THIS WORKS **
var sControlName = "&lt;asp:Literal id="lit1" runat="server" /&gt;";
<
 
This doesn't work on my planet. On my planet you would never put something like that in javascript. A literal declared server side in markup like <asp:Literal>id="lit1" Text="foo" /> would render in the browser only as foo. Putting runat=server in the string of a javascript variable is just cuckoo here on my planet. No offense to other worlds of course ;-), each to his own. 

Cheers,

Joe

On 11/15/06, Travis Staloch <twostepted at yahoo.com> wrote: ******
Sorry all for the repost.  I messed up the subject last time.  --Travis
******

Joe,

Thanks for the tip.  I agree that using <%= is a simpler way to get that id into that file.  However, the example below (1) _does_ work on windows.  The example I sent before wasn't exactly what I'd used.  I mixed some single qoutes with double quotes.  I know its ugly, but it works.   

When I said (notice single quotes at beginning and end):
var sControlName = '&lt;asp:Literal id="lit1" runat="server" /&gt;';

I really meant (single quotes replaced with double quotes).  ** THIS WORKS ** 
var sControlName = "&lt;asp:Literal id="lit1" runat="server" /&gt;";

--Travis

(1) - Example works on windows, not on linux mono.  
.aspx.cs
-------------
protected Literal          lit1; 
...
// in Page_Load()
lit1.Text =  "ControlName";

.aspx
-------------
...
&lt;script language="javascript" type="text/javascript"&gt;
var sControlName = "&lt;asp:Literal id="lit1"  runat="server" /&gt;"; 
&lt;/script&gt;
 ...

That would never work on windows either. Its not a correct way to get a 
client side  reference to a server side control. Its not a Mono migration
issue at all.

Best Regards,

Joe

On 11/14/06, Travis Staloch   wrote:
>
> FYI,
>
> I was able to solve this problem myself.  I realized that it had to do 
> with the fact that I'd included some unnecessary mono assemblies in my web
> app's bin directory (assemblies which were already in the GAC or otherwise
> on the machine which I migrated to).
>
 > This caused some confilcts as I'm guessing that mono found these private
> assemblies in my app's bin directory before finding the shared assemblies
> elsewhere.  I think that what happened is some 1.18 or  1.16 assemblies (
> Mono.Data.Tds.dll in the error below) were used by the 1.15 mono
> installation.
>
> Another problem, and possible bug, I noticed with my web app (a difference
> from windows .NET) was that I had problems  using an  to
> set a javascript variable.  Here is the code which gives me a
> NullReferenceException when I try to use it.
>
>  THIS DOESN'T WORK:
>   .aspx
>   -------- 
>    
>   .cs
>   --------
>   protected Literal          litProductDdlName;
>   ...
>   litProductDdlName.Text = ddlProducts.ClientID;
>
>
> THIS WORKS - using <%= %> escaping as a workaround: 
>   .aspx
>   --------
>   
>
> After making this change, I have been able to successfully run my migrated
>  ASP.NET web app on apache2/mod_mono.
>
> Regards,
>
>  --Travis
>
>
> *Travis Staloch * wrote:
>
> Guys,
>
> I've recently moved a .NET 1.1 web application over  from a working
> windows/IIS machine to a linux/apache2/mod_mono machine.  I keep 
>
> getting this message whenever I try to view any of the pages:
>
> System.MissingMethodException: Method not found:
> 'Mono.Data.Tds.Protocol.TdsConnectionParameters.Reset'.
> in <0x00000>  
>
> I was getting a System.TypeLoadException error from same
> assembly (Mono.Data.Tds) until I restarted apache2.
>
> Does anyone have any ideas what might be causing this? 
> Is this related to the fact that the linux machine has mono
> 1.1.15 installed while the windows machine the app migrated
> from had a later version (1.1.18 I think)?
>
> Regards,
>
 > --Travis
>
>  ------------------------------
> Want to start your own business? Learn how on Yahoo! Small Business.
>
>
> ------------------------------
> Everyone is raving about the all-new Yahoo! Mail beta. 
>
>
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com 
> http://lists.ximian.com/mailman/listinfo/mono-list
>
>
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL:  http://lists.ximian.com/pipermail/mono-list/attachments/20061114/22bced4f/attachment.html 

------------------------------

_______________________________________________
Mono-list mailing  list
Mono-list at lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-list


End of Mono-list Digest, Vol 19, Issue  19
*****************************************
   
  
---------------------------------




   

---------------------------------
Everyone is raving about  the all-new Yahoo! Mail beta. 

_______________________________________________
Mono-list maillist  -  Mono-list at lists.ximian.com 
http://lists.ximian.com/mailman/listinfo/mono-list



 
 

 
---------------------------------
Sponsored Link

Mortgage rates near 39yr lows. $420,000 Mortgage for $1,399/mo - Calculate new house payment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20061115/0595b581/attachment.html 


More information about the Mono-list mailing list