|
thank you very much, I will read it in order to have a solution, even if it works ruien my code that redirects to another page that does not work
|
|
|
|
|
Hi
I have a problem with checking if Flash installed on the user's browser in Internet Explorer, Firefox and Chrome(mainly). When the loads the page, it first checks for the flash using client script and I have to pass that(if it's installed or not) to the page. I have the client -sciprt on User Control and my problem here is to pass the result to the code-behind code of the usercotnrol.
Here is my client-script code on user control:
on error resume next
If MSDetect = "true" Then
For i = 2 to 10
If Not(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & i))) Then
Else
flashinstalled = 2
FlashVersion = i
End If
Next
End If
If flashinstalled = 0 Then
flashinstalled = 1
End If
Can any one give me idea please! I am stuck here!
Thanks in advance.
--
http://ashakthi.blogspot.com
http://kids-articles.blogspot.com
|
|
|
|
|
Hi,
Rather than roll-your-own algorithm, you could use an established JS libary such as swfobject[^] although this is aimed at selectively displaying flash if installed it does have a swfobject.getFlashPlayerVersion() method that will return the installed flash version.
Regards,
Martin
|
|
|
|
|
Use an ASP:Hidden control and in your javascript set its value using something like
var hiddenField = document.getElementById('<%=hidHasFlash.ClientID %>');
hiddenField.value = flashinstalled
And please don't use the words true and false as strings in conditionals. It hurts my eyes.
|
|
|
|
|
Can we use both C# and VB language in same aspx page?
|
|
|
|
|
no you cant use them in same page.
|
|
|
|
|
You can only use one language per page, as the code-beside is compiled (either at run time or compile time) and you an only compile one language into a single assembly.
However, you can have multiple pages that have different code-beside languages. If you are using the web application project model, this will not work as only one assembly is produced. Instead you must use the web site model, and specify the codeSubDirectories setting in the config file.
Although, why mix c# and vb.net? It is all .Net anyway. Just pick one and stick to it. Translating code from one to the other is simple enough. If you can't do the translation yourself there are hundreds of tools and websites that can do it for you.
|
|
|
|
|
The Man from U.N.C.L.E. wrote: there are hundreds of tools and websites that can do it for you.
All of which do an awful job.
|
|
|
|
|
Not at all, although I agree there are some terrible web sites out there.
I use SharpDevelop and most of the time it translates correctly. I have to say I don't translate code that much as I just write in whatever language is appropriate, but SharpDevelop definately does the job, and does it well.
Another solution would be to compile the code and use .Net Reflector to read it from the assembly. That outputs to C# or VB, along with other languages, and translates perfectly.
|
|
|
|
|
I dont think so, but yes you can use in the same project.. for that you can have different classes both C# or in VB.put it in appcode folder, make entry in web.config and now you can these classes throughout in your application. for delatills have a look in the following link
Click here
|
|
|
|
|
Yes, you can use both language by using different master page
Farogh Haider
Web developer
|
|
|
|
|
Hi Guys,
Quick question...
Is it possible to display a page from one location in an ASP.NET page?
I have an intranet application in ASP.NET 2.0 that I want to display some fileshare pages which are on our existing sharepoint portal within my site so I can keep all my menus etc for navigation.
Thank you,
oooo, the Jedi's will feel this one....
|
|
|
|
|
Have you tried iframe? Just try iframe.i guess it'll help you.
|
|
|
|
|
Thats perfect, thanks...
I'm a newb, so I've never heard of that one. Works a treat. Thank you very much.
oooo, the Jedi's will feel this one....
|
|
|
|
|
Glad to see it worked.
|
|
|
|
|
|
In addition to IFrame, look at inc. These are text files that may or may not include HTML mark up and inserted into the page using the old #insert directive.
Various manuals at my company are available this way. Each section exists as a separate formatted text file with an .inc extension. The user can retrieve single sections and the text is embedded in the page. The user can also retrieve the entire manual, which includes every section. With this technique, there is a single source for the text (which eliminates discrepancies where one page was changed an another was not), it can be reused in a variety of situations, and the use of simple mark up rather than full HTML means that managing the texts can be done by the doc writers and not IT.
|
|
|
|
|
hey, cant find how to solve this thing,
i have a test project with the following directory structure:
/root/pages/default.aspx
/root/App_LocalResources/default.aspx.resx
/root/App_LocalResources/default.aspx.fr.resx
using the following simple code:
<br />
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TestLocale._Default" UICulture="auto:en-US" Culture="auto:en-US"%><br />
<br />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br />
<br />
<html xmlns="http://www.w3.org/1999/xhtml" ><br />
<head runat="server"><br />
<title></title><br />
</head><br />
<body><br />
<form id="form1" runat="server"><br />
<div><br />
<asp:Label ID="Label1" runat="server" Text="Label" meta:resourceKey="Label1"></asp:Label><br />
</div><br />
</form><br />
</body><br />
</html><br />
at the resx file i have simple mapping for Label1.Text ,
The problem: for ssome reason ASP.NET can't find local resources when my default page is not at the root folder in the project,
when i place the default.aspx in the root project the localization works, when i place the default.aspx inside a folder it doesnt work
i have been searching everywhere and couldnt find how to make it work when using folders.
any kind of help would help!
thank you.
Net
|
|
|
|
|
|
The App_LocalResources folder needs to be in same folder as the aspx file.
/root/pages/App_LocalResources/Default.aspx.resx
/root/pages/Default.aspx
Hope this helps
Martin
|
|
|
|
|
Hi
I am using Page.ClientScript.RegisterStartupScript on my page but its not working.My clientside javascript function is not getting called.
Pls help me.
|
|
|
|
|
Are you using Ajax on you page?
|
|
|
|
|
|
Page.ClientScript does not work when we use ajax on our page.Use
ScriptManager.RegisterStartupScript instead. it'll work
|
|
|
|
|
Thanks. It worked
|
|
|
|