Hi,
I wanted to attach a zip file with a mini project for you to use, but it seems i can't.
Here are the contents of the two files i have used, sorry it is VB.Net, i don't do C#.
This is the .aspx page
<%@ Page Language="VB" AutoEventWireup="true" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<script type="text/javascript" language="javascript">
function Culture(cult)
{
alert(cult);
}
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<div>
</div>
</form>
</body>
This is the aspx.vb file
Partial Class _Default
Inherits System.Web.UI.Page
Implements ICallbackEventHandler
Public Function GetCallbackResult() As String Implements System.Web.UI.ICallbackEventHandler.GetCallbackResult
Return Threading.Thread.CurrentThread.CurrentUICulture.Name
End Function
Public Sub RaiseCallbackEvent(ByVal eventArgument As String) Implements System.Web.UI.ICallbackEventHandler.RaiseCallbackEvent
End Sub
Protected Sub form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles form1.Load
Page.ClientScript.RegisterStartupScript(Me.GetType, "getculture", "<script type='text/javascript' language='javascript'>" & ClientScript.GetCallbackEventReference(Me, "", "Culture", "") & " ;</script>")
End Sub
End Class
Hopefully that will help you out. if you need it explaining, just let me know.
Simon C
Enter your message below
Sign in or Join us (it's free).