|
Having spent a fair bit of time playing around and implementing AJAX solutions, I would recommend that you do not use the UpdatePanel. Even when the UpdatePanel is working as it should, the whole of the page is still posted back, which basically defeats the object of a partial postback. Tell tell signs of this can be seen with drop down lists, that even if outside of the UpdatePanel, will flicker on partial postback.
My preferred route for handling AJAX type functionality is through the use of the ScriptManager control's service references. Registreing a local web service through the ScriptManager control creates a JS web service proxy object that is very simple to use. It uses JSON encoding which means the web service response object can be easily accessed to extract the required data, and web service methods can be called as easily as Service.Method(params). You can also set up default success and failure functiojns to handle all web method responses.
Check out the following which gives somke examples of how to implement the above:
http://www.asp.net/AJAX/Documentation/Live/tutorials/ASPNETAJAXWebServicesTutorials.aspx
http://www.semenoff.dk/en/Code-Corner/ASP.Net.AJAX/WebService-From-JavaScript.aspx
Clean code is the key to happiness.
|
|
|
|
|
Deliver cutting edge web solutions and user experiences with Microsoft technologies, and differentiate yourself from the competition. Take one of the following live web seminars to learn more about designing and developing for the web with Expression, Visual Studio, Silverlight and more. Seize the opportunity to expand your skill-set and ask our experts any questions that you might have. Register below for this free training today.
Web Development Solutions
In an increasingly competitive marketplace, it becomes difficult to differentiate your firm. With this series, we will illuminate the value of Microsoft's newest Web technologies, including ASP.NET AJAX, Sliverlight, and the Expression Suite, and how they can propel your work to the next level. With cutting edge user experience, robust security and an integrated workflow, Microsoft's Web Technologies can add significant value to your Web business. And this seminar series will show you how:
Web Design
Microsoft Expression offers a complete, fully integrated set of technologies that allow you to design and develop rich, immersive desktop and web based applications. We begin the series with an overview of the Expression Suite. The second seminar shows how to create graphics in Expression Design and export them as bitmaps or XAML based vectors for use in desktop and web-based applications. The third demystifies where Design ends and Blend begins and helps you understand when to use one versus the other. Finally, the fourth seminar takes you through the creation of a Silverlight application, and shows you how to use the Expression suite to interface with developers in an effective workflow. The Microsoft Expression for Designers series includes:
These seminars will be available for on-demand viewing for a limited time after the dates posted. After registering above, get involved in the community at www.phizzpop.com to show off your good work and learn more from your peers and Microsoft.
|
|
|
|
|
I am working on a Home Improvements website and I want users to be able to submit articles to my site. Does CodeProject use their own custom code for article submission or do they use a third party? Can anyone recommend a good solution to use. Thanks in advance.
|
|
|
|
|
Have a look at the DotNetNuke[^] framework.
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
Hi all,
We received a wap site and it was done in php, I just want to find out what is needed to host a php site, currently the webserver is set up for .Net and I'm not sure how that will impact the php, do I need to make any changes on the IIS?
Thanks in advance
No matter how long he who laughs last laughs, he who laughs first has a head start!
|
|
|
|
|
|
Thanks
No matter how long he who laughs last laughs, he who laughs first has a head start!
|
|
|
|
|
hi all
I have some code but have problem when add "html" to tag div by javacript
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script language="JavaScript" type="text/javascript">
<!--
function addEvent()
{
var strHTML = '<a href="javascript:posttreeview('39,28', '4');">demo</a>';
document.getElementById('myDiv').innerHTML = strHTML;
}
//-->
</script>
</head>
<body>
<p><a href="javascript:addEvent();">Add Some Elements</a></p>
<div id="myDiv"> </div>
</body>
</html>
But it error javacipt when click to text??
I think it error in href="javascript:posttreeview('39,28', '4');"
Some body help me ??
|
|
|
|
|
Hi,
Your problems are being caused by the use of multiple ' and " characters within your strHTML variable.
var strHTML = '<a href="javascript:posttreeview('39,28', '4');">demo</a>';
The second ' within this line is interpreted as the end of the string i.e. '<a href="javascript:posttreeview(' and will therfore cause errors when attempting to process the remaining script.
To correct this issue you will simply need to break up the string as follows:
var strScript = "javascript:posttreevie('39,28', '4');";
var strHTML = '<a href="' + strScript + '">demo</a>';
Hope this helps.
Clean code is the key to happiness.
|
|
|
|
|
Alternatively you can escape the quotes:
var strHTML = '
|
|
|
|
|
i have created a web application for user(supplier) to view their information using my application.it does not seem to work. and i still couldnt figured out where has gone wrong.but the error given was...
The IListSource does not contain any data sources.
Source Error:
Line 14: Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Line 15: GridView1.DataSource = supplier.retrieveSupplier()
Line 16: GridView1.DataBind()
Line 17: End Sub
Line 18: End Class
|
|
|
|
|
Did you try Googling[^] the error message to find out what it means?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
One of my website developed on asp classics, i need to configure it on IIS 6.0
My hard drive consists on 5 drives from C to G drive, each drive on FAT#@ partition excluding D drive which is on NTFS and the IIS server also on this drive. When i configure my website on the IIS server and after installing the frontpage extension it doesn't run on the browser and says "file or directory not found on the server."
what do i do ? please help.
thank you.
|
|
|
|
|
I'd google around for configuring it. I've run into this problem before and found a google search to help. I don't remember how I fixed it since it was a long time ago.
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
I have to validate text entered in a TextBox with the value in a table ie a value stored in a Database.
Pls give me snippet of code how it can be done using AJAX
|
|
|
|
|
Have you tried googling around?
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
Hi,
Is the validation you are performing a straight text comparison, or should the entered text match one of several values pulled from the database?
As you are using AJAX, if you want the validation to fire when the TextBox loses focus, then the best way to do this would be to write a custom handler that, when fired on the onblur event of the TextBox, calls a local web service that is passed the entered text. The web service can then perform some server-side validation against the database and pass back the result. If the entered text is invalid, use JavaScript to display an error icon, or whatever element is being used for validation errors. If you are using .Net 2.0 or higher then the use of the ScriptManager control to create JS web service proxy objects, makes this operation very simple.
If validation only needs to be run when the form is posted back then it would be simpler to use a custom validation control and validate the entered text when the page is posted. You simply need to put your validation logic in the server-side ServerValidate event of the custom validation control.
Hope this helps...
Clean code is the key to happiness.
|
|
|
|
|
Dear all,
I have a serious problem that can't resolve.
The problem are:
1- I cann't integrate Drupal into Moodle System. (big problem)
2- But i can intergrate Moodle into Drupal System. (It's ok)
The reason i want to integrate Drupal into Moodle because
i want Moodle as a main system of Drupal.
The structure is "Drupal in Moodle.".
Please help soon.
Thanks,
Best regards,
Han
|
|
|
|
|
You might want to look on moodle's site.
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
var doc = new ActiveXObject("Word.Application");
doc.Visible=false;
doc.Documents.Open("C:\\users.doc");
var txt;
txt = doc.Documents("C:\\users.doc").Content;
alert(txt);
doc.quit(0); // quit word (very important or you'll quickly chew up memory!)
i am getting error : automation server can't create object
modified on Friday, January 25, 2008 4:36:59 AM
|
|
|
|
|
ritu4321 wrote: i am getting error
There is an error number also yes? Look it up in the documentation. It will provide more detailed information.
led mike
|
|
|
|
|
Hai,
pls give me an idea of how to call multiple functions on clientside
for eg:
My code is like this
<asp:button id="btnSave" runat="server" borderstyle="Groove" onclick="btnSave_Click">
Text="Save" OnClientClick="val(); " />ie OnClientClick how can i call multiple functions
|
|
|
|
|
Hi,
This can be easily achieved by either calling a single JS function that will then call all the functions you require, or by simply separating calls with a semi-colon e.g.
<asp:button id="btnSave" runat="server" onclick="btnSave_Click"
Text="Save" OnClientClick="fn1(); fn2(); fn3();" />
or
<asp:button id="btnSave" runat="server" onclick="btnSave_Click"
Text="Save" OnClientClick="clickFn();" />
in your JS file...
function clickFn()
{
fn1();
fn2();
fn3();
}
Clean code is the key to happiness.
|
|
|
|
|
Hai,
Could you pls give me an idea that how to call a javascript function on PageLoad
|
|
|
|
|
Hi,
There are a couple of ways to do this, as there are a number of DOM events that you can hook into. My preferred method is to attach functions to the window.onload event. This can be done as follows:
function myOnloadFunction()
{
// Add your page load JS here
}
function addEvent(obj, type, fn)
{
if (obj.addEventListener)
obj.addEventListener(type, fn, false);
else if (obj.attachEvent)
obj.attachEvent("on" + type, fn);
}
addEvent(window, "load", myOnloadFunction);
The above example provides a cross-browser solution for attaching events to DOM elements.
Clean code is the key to happiness.
|
|
|
|