|
Hi,
Me too had similar problem. Try using following code
private void ShowMessage(string message)
{
//This code works if there's no UpdatePanel
//string script = "<script type=\"text/javascript\">alert('" + message + "');</script>";
//Page.ClientScript.RegisterStartupScript(this.GetType(), new Guid().ToString(), script);
//Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
// We must do something slightly different with an UpdatePanel
string jScript = "alert('" + message + "');";
ScriptManager.RegisterClientScriptBlock(UpdatePanelNewsLetter, UpdatePanelNewsLetter.GetType(), new Guid().ToString(), jScript, true);
}
now call the ShowMessage() function wherever required in UpdatePanel
Regards...
|
|
|
|
|
Hi All,
Could you please give me an Html code/Java script code to detect an opertaing system before opeing a web page?
How can i place the code in my Html for the page so that it can call the script before loding the page?
Thank you very much
Regards
|
|
|
|
|
kibromg wrote: Could you please give me an Html code/Java script code to detect an opertaing system before opeing a web page?
Google[^] not working where you live?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
i have created a multiview which has 4 views.........multiview is placed in a panel.... when the active view is changed.... active views are displayed at different locations of the screen exactly whre they are present in ASPX file.......... i want that whatever view is active it should be displayed on the same location.....
What should i do
|
|
|
|
|
If you're using the asp.net multiview control it should be working fine, no need for extra panels.
only two letters away from being an asset
|
|
|
|
|
in my .cs file when i write
droplist.Attributes.Add("onclick", "return confirm('Do you wAnt to continue')");
the above is working but when i write
droplist.Attributes.Add("onclick", "click()");
it doesnot what shud i do to solve the problem
i have a function in cs file
public void click()
{
}
|
|
|
|
|
droplist.Attributes.Add("onclick", "click()");
This line of code establishes that a javascript function named 'click()' will handle the javascript onclick event for your dropdownlist control.
i have a function in cs file
public void click()
{
}
You are confusing client-side event handlers (typically written in Javascript, located in the ASPX page) with server-side event handlers (written in your preferred .NET language, located in the code-behind file). There's no server-side onclick event for the DropDownList control, so presumably you want to define a javascript method to execute in the client's browser. You can do this thus:
<script language="javascript">
function click()
{
// add implementation here
}
</script>
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Hello everyone,
I was wondering how Google Analytic works. The tool allows website owners to check where their visitor have been prior to coming to their website. If you know how such a tool works and what is required please elaborate. Thank you in advance for your time
|
|
|
|
|
severvariables and I believe the one you want is REFERER
MrPlankton
|
|
|
|
|
Hi MrPlankton,
Thank you so much for responding to my post. I have Googled ServerVariables Referer, Referer, and Server Variables but nothing useful came up. A bunch of the sites that came up were in Chinese. On one of the sites that came up, it said Server Variables are used on Cold Fusion server. I don't know anything about Cold Fusion server at this point. Do you know where I can more info on Server Variables and how to use them? Thank you in advance for your help.
modified on Tuesday, January 29, 2008 7:19:09 PM
|
|
|
|
|
ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.NETDEVFX.v20.en/cpref12/html/P_System_Web_HttpRequest_ServerVariables.htm
MrPlankton
|
|
|
|
|
let's say I have a page page.aspx, it includes a class named SampleClass and a method name myMethod.
I want to call this method from a HTML page.
how do I do this?
Shimi
|
|
|
|
|
There are 2 ways of doing this in my experience;
1. Set a flag, say a hidden text field with some indicator of what method you want to call on the server. Then do a self submit in javascript and look for flag on Page_load event. If you see the flag call the method.
2. Use ajax
MrPlankton
|
|
|
|
|
I don't know to perform both of your suggestions
Shimi
|
|
|
|
|
I have an article which is basically a control for implementing ajax (which is what your talking about). These days though you should just look into asp.net ajax. www.asp.net
|
|
|
|
|
If it's asp.net (page.aspx would indicate this) you just need an event, say a button click to generate the postback, from which you can call the method you want.
Or, script callbacks, http://www.developer.com/net/asp/article.php/3485991[^]
only two letters away from being an asset
|
|
|
|
|
could you explain to me how to this please?
I mean, what I'm trying to do is to use a method \ function from VB\C#.NET compiled class in the App_Code folder from a simple html page at the OnClick etc. event that has been raised via a HTML and other pure client controls\events.
Shimi
|
|
|
|
|
Hello all,
I am quite in a dilemma at the moment since i cannot find some independent reading which thoroughly describes the characteristics of j2ee vs .net.
I am experienced with .net but would like to know what the j2ee platform offers since several components used are totally free.
can anybody give me his/her views on the subject.
Thank you very much,
Chris
|
|
|
|
|
ChrisFarrugia wrote: I am quite in a dilemma at the moment since i cannot find some independent reading which thoroughly describes the characteristics of j2ee vs .net.
This forum is for programming questions specifically related to ASP.NET.
I suggest you post your question in the 'General Discussions' forum.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Thank you very much for your reply and excuse me.
I posted it here because my main concern was asp.net developmen vs j2ee. i will post it in the appropriate forum.
Thanks a lot and excuse me once again,
Chris
|
|
|
|
|
Hello there,
I m really stuck on one thing i have searched almost every where on the internet but so far no solution so thats why i m positing my problem here.
I have to develop a program that will copy or upload an excel file to a ftp server, this part is completed but the problem is that my client is behind proxy, so basically have to send through proxy. There is class ftpwebrequest but it work for framework 2 and above and i have use framework 1.1.
If anyone know a solution or link, i ll be grateful.
Thanks in advance.
|
|
|
|
|
Hai all ,
I have used the folliwing code to record voice in my application.
using Microsoft.VisualBasic.Devices;
using Microsoft.VisualBasic;using System.Runtime.InteropServices;
public partial class record : System.Web.UI.Page
{
[DllImport("winmm.dll", EntryPoint = "mciSendStringA", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
private static extern int mciSendString(string lpstrCommand, string lpstrReturnString, int uReturnLength, int hwndCallback);
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
// record from microphone
mciSendString("open new Type waveaudio Alias recsound", "", 0, 0);
mciSendString("record recsound", "", 0, 0);
}
protected void Button2_Click(object sender, EventArgs e)
{
// stop and save
mciSendString("save recsound c:\\lijo.wav", "", 0, 0);
mciSendString("close recsound ", "", 0, 0);
Computer c = new Computer();
c.Audio.Stop();
}
protected void Button3_Click(object sender, EventArgs e)
{
Computer computer = new Computer();
computer.Audio.Play("c:\\lijo.wav", AudioPlayMode.Background);
}
}
it is perfectly working in my local system.But when i uploaded into sver it is showing the following error.
Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: System.Security.Permissions.SecurityPermission
Source Error:
Line 28: mciSendString("record recsound", "", 0, 0);
Line 29:
Line 30: }
Line 31: protected void Button2_Click(object sender, EventArgs e)
Line 32: {
plse help me its urgent.
Thanks in advance
regrds
Lijo
|
|
|
|
|
Hi Lijo,
The same happened to me also,I did n't get any error on server side but only empty file is storing with out recording.Everything working fine on my local machine.
Please suggest me if you have any idea.
Thanks
|
|
|
|
|
I'm working on an application which has a viewstate of approximately 250kb in a Notepad file. When doing a postback (e.g. on changing a dropdownlist's value) it takes a whopping 9 seconds to reload the page. This isn't really workable, problem is that I can't rebuild the application (as much as I'd like to) and I cannot disable the viewstate. Is there any way to speed this entire process off, or anything else that might be causing this besides the viewstate?
|
|
|
|
|
Rather than having the drop down list AutoPostBack, have you thought of using AJAX or JavaScript to handle the onchange event? Would be a lot quicker and provied a better user experience all round.
Clean code is the key to happiness.
|
|
|
|