|
If you are using AJAX then the only way i have found yet to give an alert to a user on return to the Asynchronous post back is to add an "end request" handler to the PageRequestManager.
In this way you can tell the request manager to run a javascript function on returning from a Asynchronous post back event of AJAX.
Code for doing this is :
function load()
{
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
}
where "EndRequestHandler" will be the name of your javascript function you want to call.
Call the above function in Onload event of tag:
function EndRequestHandler()
{
alert("You record has been saved successfully");
}
Now If you want to give a different message based on your logic in server side code (code behind) then you can use a server side Hidden Field:
Set its value in server side code on Asychronous Post Back:
Protected Sub btn_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnCreateSample.Click
If condition Then
hdnValue.value = "do this"
Else
hdnValue.value = "do that"
End If
End Sub
Now you can check the value of this Hidden Field in your Client Side EndRequestHandler function and give a different alert to user based on its value:
function EndRequestHandler()
{
if (document.getElementById('<%= hdnValue.ClientID %>').value == "do this")
{
alert("You record has been saved successfully");
}
else
{
alert("There is an error");
}
}
http://zeemalik.wordpress.com/
To do what can be done is a Intelligent Job and to do what should be done is a Genious Job
done is a Genious Job
|
|
|
|
|
your post is ambiguous. Are you trying to ask or tell?
If you are asking about how to call a javascript function after updating a update panel then use the scriptmanager e.g.
<br />
ScriptManager.RegisterStartupScript(idOfTheUpdatepanel, GetType(UpdatePanel), "scriptkey", javascriptFunctionOrScriptToBeCalled, True);<br />
-----
|
|
|
|
|
Hi
guys i am facing problem with drop down list in data grid , drop down list is placed in data grid , when the user scrolls the grid vertically down o ther controls present in grid goes beneath the data grid header but drop down list goes above the data grid header, i know this problem is due to windowed control Z-Index issue in IE 6.0, do any one have any idea how to control it, is there any way it can be done with CSS, thankx in advance,
regards
|
|
|
|
|
Are you using Fixed Header Grid?
|
|
|
|
|
Yup man i am using fix header in data grid.
|
|
|
|
|
I think you are using style sheet to fix the datagrid header. It is not possible to hide the drop down lists with just the z-index. Instead you have to use iframe to hide them. You will be setting the z-index for iframe greater than the drop down lists and z-index for your header row will be greater than the iframe. And then you will have to reposition/resize the iframe to go right beneath the header row. This way you will be able to hide the drop down lists.
If I am getting you right then I will suggest to use a separate table with just one row on top of data grid. And then on load get the header row from data grid and add it to the table. I have done it this way. There is quite a lot of javascript involved to achieve this. But if you search online you should be able to find articles.
-----
|
|
|
|
|
man can u send me the javascript code, thankx for reply,
regards,
|
|
|
|
|
|
Hi,
I have a drop down for date which has All,From and Between option on search page. I also have two text boxes for Date, initially these boxes are set to hidden using style.
When a user chooses the Between option two text boxes appears on screen [I mark them visible through javascript].
Now a user press submit button and gets the desired result. If a user clicks back on browser to reach the search page the Two text boxes for date dis-appears and the option in dropdown is still BETWEEN. How can I make the two text boxes appear if the user clicks on back button and the choice was BETWEEN.
Regards,
Pavas
-----------------------
[http://longjump.com/]
Dynamic business applications that manage and coordinate teams and information
-----------------------
|
|
|
|
|
Got the answer.
SImply execute the javascript at the end of the page to check the options
Thanks for reading it
Regards,
Pavas
-----------------------
[http://longjump.com/]
Dynamic business applications that manage and coordinate teams and information
-----------------------
|
|
|
|
|
I have a problem with an application I packaged using Visual Studio .NET. Every time I try to run it from the Program Files, the installer starts running all over again. Please help.
|
|
|
|
|
But doesn't it stop at a screen showing 'Repair/Remove' instead of like a fresh install?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Hi All!
I've a Dropdownlist. How to display 2 Field of 1 Table to Dropdownlist another.
Thanks all !
RICHING MINDS,CHANGING LIVE
|
|
|
|
|
|
hi,
when u defining the datatext property for dropdown list at that time u can Concatenate two fields there.
|
|
|
|
|
phuhoa wrote: 2 Field of 1 Table to Dropdownlist
Wouldn't this be a beginner's databinding?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Hi All,
I need to read a file (.doc, .html, .jpg etc) and convert it to pdf. I am able to read html file but if that html file has any image then it just show the Image as text but the image is not shown. I have the code for reading any image file but I am not getting how do I merge it with the code of reading html file.
Please tell me how do I do it???
|
|
|
|
|
you'd have to parse the HTML file for img tags, and then load the images and inject them.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks for the reply sir but I am not getting how do I parse the html file. Can u please help with the initial code???
Thanks again...
|
|
|
|
|
Check out http://itextsharp.sourceforge.net/[^]
It has a lot of tutorial chapters to help you achieve this conversion.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
I did that sir, but not getting how to start with it??? Can u please help me with this??
|
|
|
|
|
|
Thanks sir,
But my requirement is different, my Image is embedded in html file and so I wanted to parse the html file.
Please tell me how do I do this...
Thanks again...
|
|
|
|
|
I am doing a crm project,i.e, Customer Relationship Management.
the first module i am doing is called url filteration. In this i have a database which has the fields name,emailid,designation,line of business,company,city,country which has around 80,000 entries and gets updated daily.this database i have considered as one table . I have another table which has only email-ids which called exclusion list which is in 3 formats i.e,1.) only extensions(eg..gov,.edu etc) 2.) emailid (eg. name@company.com), 3.)company websites (eg. ti.com etc), even this table keeps on updating daily. What my application should do is it should compare the email-id in the exclusion list table with the first table and should delete those entries which match in the table which consists of 80,000 entries which is the master table.The front end is ASP.Net and backend is ADO.Net. The database i am using is MS Access. I wanted a code for the ui design and also for the implementation of this module, ie, database connection etc. I have another module with this which i will tell later. Please help me.
|
|
|
|
|
I must be mistaken, it looks to me like you are asking for the code to handle this task. What is it you were really asking for ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|