Showing posts with label run. Show all posts
Showing posts with label run. Show all posts

Saturday, March 31, 2012

the beginner-examples

http://samples.gotdotnet.com/quickstart/aspplus/

I went to the url above, and I am following there pages
to get knowledge.

But several examples, "run sample", is not working.
How come they couldnt manage to keep them
working ?

I feel it is a little harder to learn, since it really isnt
a fully working tutorial-site.

/ martin kHi Takemeaway,

I noticed the same stuff but I learnt they've got heavy traffic on the site that hampers their performance!
Which ones didn't work? I just tried a few on that site and they seemed to work. More importantly, is there a specific question you had about one of those tutorials?
Try here, these all work:

http://asp.net/Tutorials/quickstart.aspx

Wednesday, March 28, 2012

The compiler failed with error code 128

HELP!!!!
We have got a W2k server running IIS5 with .NET framework 1.1 and .NET
framework SP1. All ASP.NET applications cannot run on this box. It all
returned with the same error:
Compilation Error
Description: An error occurred during the compilation of a resource required
to service this request. Please review the following specific error details
and modify your source code appropriately.
Compiler Error Message: The compiler failed with error code 128.
I have made sure there is only ASP.NET ISAPI filter running and tried
aspnet_iis -i. Basically I'm out of ideas. Can someone please tell me what
the heck is going on here?
RogerHi, Roger.
I googled for "The compiler failed with error code 128"
and found a few references. The most promising are :
http://www.sitepoint.com/forums/pri...ad.php?t=164998
where it's reported that either
http://www.hanselman.com/blog/Perma...b4.
aspx
or
http://www.webservertalk.com/Uwe/Fo...
irus_k=100252
Here's the Google search,
to facilitate your search for more info:
http://www.google.com/search?as_q=&...ch=&safe=images
Good luck !
Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaol
=====================
"Roger Wang" <rogerw@dotnet.itags.org.sybrel.com> wrote in message
news:uXyaKb$CFHA.3376@dotnet.itags.org.TK2MSFTNGP12.phx.gbl...
> HELP!!!!
> We have got a W2k server running IIS5 with .NET framework 1.1 and .NET
> framework SP1. All ASP.NET applications cannot run on this box. It all
> returned with the same error:
> Compilation Error
> Description: An error occurred during the compilation of a resource
> required to service this request. Please review the following specific
> error details and modify your source code appropriately.
> Compiler Error Message: The compiler failed with error code 128.
>
> I have made sure there is only ASP.NET ISAPI filter running and tried
> aspnet_iis -i. Basically I'm out of ideas. Can someone please tell me what
> the heck is going on here?
> Roger
>
I have the same error too.
I installed the SP1 of .NET Framework:
http://www.microsoft.com/downloads/...db-a83353618b38
and when I restarted my computer I could see my aspx pages, but then, when I
opened Visual Studio.NET and I continued with my ASP.NET application, when I
debug my app the error occurred again.
I don't know why, and I don't know if there's a good solution
I updated Windows but the problem continues.
I have Windows 2000 Sever with SP3.
I hope someone can help me.
Regards.
"Juan T. Llibre" wrote:

> Hi, Roger.
> I googled for "The compiler failed with error code 128"
> and found a few references. The most promising are :
> http://www.sitepoint.com/forums/pri...ad.php?t=164998
> where it's reported that either
> http://www.hanselman.com/blog/Perma...b
4.aspx
> or
> http://www.webservertalk.com/Uwe/Fo...ode-128

> solved the problem.
> Though both links refer to faulty ISAPI filter
> issues, which you say you've discarded, it might
> help you to get the background info at those links.
> There's an additional comment by Jacob Yang
> ( Microsoft Online Partner Support ) which refers
> that the issue might be related to this backdoor trojan:
> http://de.mcafee.com/root/genericVI...&virus_k=100252
> Here's the Google search,
> to facilitate your search for more info:
> http://www.google.com/search?as_q=&...ch=&safe=images
> Good luck !
>
> Juan T. Llibre
> ASP.NET MVP
> http://asp.net.do/foros/
> Foros de ASP.NET en Espa?ol
> =====================
> "Roger Wang" <rogerw@dotnet.itags.org.sybrel.com> wrote in message
> news:uXyaKb$CFHA.3376@dotnet.itags.org.TK2MSFTNGP12.phx.gbl...
>
>

Monday, March 26, 2012

The compiler failed with error code 128

HELP!!!!

We have got a W2k server running IIS5 with .NET framework 1.1 and .NET
framework SP1. All ASP.NET applications cannot run on this box. It all
returned with the same error:

Compilation Error
Description: An error occurred during the compilation of a resource required
to service this request. Please review the following specific error details
and modify your source code appropriately.

Compiler Error Message: The compiler failed with error code 128.

I have made sure there is only ASP.NET ISAPI filter running and tried
aspnet_iis -i. Basically I'm out of ideas. Can someone please tell me what
the heck is going on here?

RogerHi, Roger.

I googled for "The compiler failed with error code 128"
and found a few references. The most promising are :

http://www.sitepoint.com/forums/pri...ad.php?t=164998
where it's reported that either
http://www.hanselman.com/blog/Perma...ad081eaab4.aspx
or
http://www.dotnetmonster.com/Uwe/Fo...-error-code-128
solved the problem.

Though both links refer to faulty ISAPI filter
issues, which you say you've discarded, it might
help you to get the background info at those links.

There's an additional comment by Jacob Yang
( Microsoft Online Partner Support ) which refers
that the issue might be related to this backdoor trojan:
http://de.mcafee.com/root/genericVI...&virus_k=100252

Here's the Google search,
to facilitate your search for more info:

http://www.google.com/search?as_q=&...ch=&safe=images

Good luck !

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaol
=====================

"Roger Wang" <rogerw@dotnet.itags.org.sybrel.com> wrote in message
news:uXyaKb$CFHA.3376@dotnet.itags.org.TK2MSFTNGP12.phx.gbl...
> HELP!!!!
> We have got a W2k server running IIS5 with .NET framework 1.1 and .NET
> framework SP1. All ASP.NET applications cannot run on this box. It all
> returned with the same error:
> Compilation Error
> Description: An error occurred during the compilation of a resource
> required to service this request. Please review the following specific
> error details and modify your source code appropriately.
> Compiler Error Message: The compiler failed with error code 128.
>
> I have made sure there is only ASP.NET ISAPI filter running and tried
> aspnet_iis -i. Basically I'm out of ideas. Can someone please tell me what
> the heck is going on here?
> Roger
I have the same error too.
I installed the SP1 of .NET Framework:
http://www.microsoft.com/downloads/...db-a83353618b38
and when I restarted my computer I could see my aspx pages, but then, when I
opened Visual Studio.NET and I continued with my ASP.NET application, when I
debug my app the error occurred again.
I don't know why, and I don't know if there's a good solution
I updated Windows but the problem continues.
I have Windows 2000 Sever with SP3.
I hope someone can help me.
Regards.

"Juan T. Llibre" wrote:

> Hi, Roger.
> I googled for "The compiler failed with error code 128"
> and found a few references. The most promising are :
> http://www.sitepoint.com/forums/pri...ad.php?t=164998
> where it's reported that either
> http://www.hanselman.com/blog/Perma...ad081eaab4.aspx
> or
> http://www.dotnetmonster.com/Uwe/Fo...-error-code-128
> solved the problem.
> Though both links refer to faulty ISAPI filter
> issues, which you say you've discarded, it might
> help you to get the background info at those links.
> There's an additional comment by Jacob Yang
> ( Microsoft Online Partner Support ) which refers
> that the issue might be related to this backdoor trojan:
> http://de.mcafee.com/root/genericVI...&virus_k=100252
> Here's the Google search,
> to facilitate your search for more info:
> http://www.google.com/search?as_q=&...ch=&safe=images
> Good luck !
>
> Juan T. Llibre
> ASP.NET MVP
> http://asp.net.do/foros/
> Foros de ASP.NET en Espa?ol
> =====================
> "Roger Wang" <rogerw@dotnet.itags.org.sybrel.com> wrote in message
> news:uXyaKb$CFHA.3376@dotnet.itags.org.TK2MSFTNGP12.phx.gbl...
> > HELP!!!!
> > We have got a W2k server running IIS5 with .NET framework 1.1 and .NET
> > framework SP1. All ASP.NET applications cannot run on this box. It all
> > returned with the same error:
> > Compilation Error
> > Description: An error occurred during the compilation of a resource
> > required to service this request. Please review the following specific
> > error details and modify your source code appropriately.
> > Compiler Error Message: The compiler failed with error code 128.
> > I have made sure there is only ASP.NET ISAPI filter running and tried
> > aspnet_iis -i. Basically I'm out of ideas. Can someone please tell me what
> > the heck is going on here?
> > Roger
>

The compiler failed with error code 2000

I keep getting this message "The compiler failed with error code 2000"
when pressing PF5 to run Debug. This is not a compile error, it gets
past the compile. I get this when it tries to load up my web
application. Once I get this message, I then rebuild the solution and
then I can press PF5 and run debug just fine. It started out
happening just once in a while, now it happens every other time I try
and run in Debug mode. I have tried several things, "Rebuild
Solution", Get out of visual Studio and then come back in, and I have
also tried to delete
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Tempo rary ASP.NET Files.
All of these options works once, then I have to do it all over again.

Anybody have a more permanent solution?Hi

This error indicates various initialization failures. Reinstall Visual Studio.

Ravikanth[MVP]

"Russ" wrote:

> I keep getting this message "The compiler failed with error code 2000"
> when pressing PF5 to run Debug. This is not a compile error, it gets
> past the compile. I get this when it tries to load up my web
> application. Once I get this message, I then rebuild the solution and
> then I can press PF5 and run debug just fine. It started out
> happening just once in a while, now it happens every other time I try
> and run in Debug mode. I have tried several things, "Rebuild
> Solution", Get out of visual Studio and then come back in, and I have
> also tried to delete
> C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Tempo rary ASP.NET Files.
> All of these options works once, then I have to do it all over again.
>
> Anybody have a more permanent solution?
OK, first I reinstalled the framework 1.1 - It still happened.

I then "Reinstalled Visual Studios" (without uninstalling it first)-
It still happened.

Then I removed/uninstalled Visual Studios and then re-installed it. -
It is still happening.

Here is additional information ...

vbc : Command line error BC2017 : could not find library
'c:\windows\microsoft.net\framework\v1.1.4322\temp orary asp.net
files\peb.intranet.2.0\c9e073a6\c1381c80\assembly\ dl2\2820a9d4\20469c4b_7422c401\interop.combiztalks uspendedqueue.dll'

From what I can tell it's looking for a directory that's not on my PC.
When looking at my hard drive I have the following path...

'c:\windows\microsoft.net\framework\v1.1.4322\temp orary asp.net
files\peb.intranet.2.0\c9e073a6\c1381c80\assembly\ dl2\

after the "d12" directory there is no 2820a9d4 directory. There are
10 other directories but not the one Visual Studio is looking for.

If I do a "Re-build Solution", then I can compile in debug again, or
if I get out of Visual studio, come back in, then it will work. I
have even deleted the "temporary asp.net" path.

Any other ideas of what maybe causing this?

"Ravikanth[MVP]" <RavikanthMVP@dotnet.itags.org.discussions.microsoft.com> wrote in message news:<7294B7D8-7DDC-48FE-AA17-E3909F8C4FDD@dotnet.itags.org.microsoft.com>...
> Hi
> This error indicates various initialization failures. Reinstall Visual Studio.
> Ravikanth[MVP]
>
> "Russ" wrote:
> > I keep getting this message "The compiler failed with error code 2000"
> > when pressing PF5 to run Debug. This is not a compile error, it gets
> > past the compile. I get this when it tries to load up my web
> > application. Once I get this message, I then rebuild the solution and
> > then I can press PF5 and run debug just fine. It started out
> > happening just once in a while, now it happens every other time I try
> > and run in Debug mode. I have tried several things, "Rebuild
> > Solution", Get out of visual Studio and then come back in, and I have
> > also tried to delete
> > C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Tempo rary ASP.NET Files.
> > All of these options works once, then I have to do it all over again.
> > Anybody have a more permanent solution?
> > "Russ" wrote:
> > > I keep getting this message "The compiler failed with error code 2000"
> > > when pressing PF5 to run Debug. This is not a compile error, it gets
> > > past the compile. I get this when it tries to load up my web
> > > application. Once I get this message, I then rebuild the solution and
> > > then I can press PF5 and run debug just fine. It started out
> > > happening just once in a while, now it happens every other time I try
> > > and run in Debug mode. I have tried several things, "Rebuild
> > > Solution", Get out of visual Studio and then come back in, and I have
> > > also tried to delete
> > > C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Tempo rary ASP.NET Files.
> > > All of these options works once, then I have to do it all over again.
> > > > > Anybody have a more permanent solution?
>
We also know about this problem and a temporary solution (workaround) that works.
Annoying but faster than closing visual studio. When you compile the solution,
and then you get this error when you run it...try changing the mode from Debug to
Release and back to Debug or toggle it to the opposite. From there, try running
the application again. It should go away.

We found that it has something to do with Component Services and
Transactions...<mumbles
Mythran

The compiler failed with error code 2000

I keep getting this message "The compiler failed with error code 2000"
when pressing PF5 to run Debug. This is not a compile error, it gets
past the compile. I get this when it tries to load up my web
application. Once I get this message, I then rebuild the solution and
then I can press PF5 and run debug just fine. It started out
happening just once in a while, now it happens every other time I try
and run in Debug mode. I have tried several things, "Rebuild
Solution", Get out of visual Studio and then come back in, and I have
also tried to delete
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files.
All of these options works once, then I have to do it all over again.
Anybody have a more permanent solution?Hi
This error indicates various initialization failures. Reinstall Visual Studi
o.
Ravikanth[MVP]
"Russ" wrote:

> I keep getting this message "The compiler failed with error code 2000"
> when pressing PF5 to run Debug. This is not a compile error, it gets
> past the compile. I get this when it tries to load up my web
> application. Once I get this message, I then rebuild the solution and
> then I can press PF5 and run debug just fine. It started out
> happening just once in a while, now it happens every other time I try
> and run in Debug mode. I have tried several things, "Rebuild
> Solution", Get out of visual Studio and then come back in, and I have
> also tried to delete
> C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files.
> All of these options works once, then I have to do it all over again.
>
> Anybody have a more permanent solution?
>
OK, first I reinstalled the framework 1.1 - It still happened.
I then "Reinstalled Visual Studios" (without uninstalling it first)-
It still happened.
Then I removed/uninstalled Visual Studios and then re-installed it. -
It is still happening.
Here is additional information ...
vbc : Command line error BC2017 : could not find library
'c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net
files\peb.intranet.2. 0\c9e073a6\c1381c80\assembly\dl2\2820a9d
4\20469c4b_7422
c401\interop.combiztalksuspendedqueue.dll'
From what I can tell it's looking for a directory that's not on my PC.
When looking at my hard drive I have the following path...
'c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net
files\peb.intranet.2.0\c9e073a6\c1381c80\assembly\dl2\
after the "d12" directory there is no 2820a9d4 directory. There are
10 other directories but not the one Visual Studio is looking for.
If I do a "Re-build Solution", then I can compile in debug again, or
if I get out of Visual studio, come back in, then it will work. I
have even deleted the "temporary asp.net" path.
Any other ideas of what maybe causing this?
"Ravikanth[MVP]" <RavikanthMVP@dotnet.itags.org.discussions.microsoft.com> wrote in message news:<7294B7D8-7DDC-4
8FE-AA17-E3909F8C4FDD@dotnet.itags.org.microsoft.com>...
> Hi
> This error indicates various initialization failures. Reinstall Visual Stu
dio.
> Ravikanth[MVP]
>
> "Russ" wrote:
>

We also know about this problem and a temporary solution (workaround) that w
orks.
Annoying but faster than closing visual studio. When you compile the soluti
on,
and then you get this error when you run it...try changing the mode from Deb
ug to
Release and back to Debug or toggle it to the opposite. From there, try run
ning
the application again. It should go away.
We found that it has something to do with Component Services and
Transactions...<mumbles>
Mythran

The ConnectionString property has not been initialized

Hi, I am trying to run some code I got off from the Quickstart tutorial for connecting to an Access database. I have been attempting several different methods from several different tutorials, none of which have been successful.

Here is the code that I have used which gave me the error: "The ConnectionString property has not been initialized" The complete error message is posted below the code.


<%@dotnet.itags.org. Import Namespace="System.Data" %>
<%@dotnet.itags.org. Import Namespace="System.Data.SqlClient" %
<html>
<script language="VB" runat="server"
Sub Page_Load(Sender As Object, E As EventArgs)

Dim DS As DataSet
Dim MyConnection As SqlConnection
Dim MyCommand As SqlDataAdapter

MyConnection = New SqlConnection(System.Configuration.ConfigurationSettings.AppSettings("PubsString"))
MyCommand = New SqlDataAdapter("select * from Release_of_Information", MyConnection)

DS = new DataSet()
MyCommand.Fill(ds, "Release_of_Information")

MyDataGrid.DataSource=ds.Tables("Release_of_Information").DefaultView
MyDataGrid.DataBind()
End Sub

</script

Below is the complete error message.

I made a change to the web.cnfg file, as is stated below, and all that I got was even less functionality (okay, no functionality) from the webserver.

any ideas ?

The ConnectionString property has not been initialized.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: The ConnectionString property has not been initialized.

Source Error:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

<%@dotnet.itags.org. Page Language="C#" Debug="true" %
or:

2) Add the following section to the configuration file of your application:

<configuration>
<system.web>
<compilation debug="true"/>
</system.web>
</configurationTry adding a Trace.Write (or a response.write) to see what your application sees as the configuration string - like:
Trace.Write("Config = " & ConfigurationSettings.AppSettings("PubsString"))

see what's really happening there - - it looks like, at first glance, that it merely doesn't find a viable connection string there.
Check out this link:

http://www.connectionstrings.com/
With my code now looking like this:

<configuration>
<appSettings>
<add key="PubsString" value="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\C:\mikep\Career_Start\Career_Start.mdb;User Id=admin;Password=;" />
</appSettings>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration
<%@dotnet.itags.org. Import Namespace="System.Data" %>
<%@dotnet.itags.org. Import Namespace="System.Data.SqlClient" %
<html>
<script language="VB" runat="server"
Sub Page_Load(Sender As Object, E As EventArgs)
Trace.Write("Config = " & ConfigurationSettings.AppSettings("PubsString"))
Dim DS As DataSet
Dim MyConnection As SqlConnection
Dim MyCommand As SqlDataAdapter

MyConnection = New SqlConnection(System.Configuration.ConfigurationSettings.AppSettings("PubsString"))
MyCommand = New SqlDataAdapter("select * from Release_of_Information", MyConnection)

DS = new DataSet()
MyCommand.Fill(ds, "Release_of_Information")

MyDataGrid.DataSource=ds.Tables("Release_of_Information").DefaultView
MyDataGrid.DataBind()
End Sub

</script
<body

I am still getting "The ConnectionString property has not been initialized" error message.

I will be glad if I can get beyond this...
your code in web.config looks fine to me just check that you are using the same username and password as you have specified.

Also try changing this the following line:


MyConnection = New SqlConnection(System.Configuration.ConfigurationSettings.AppSettings("PubsString"))

TO

string ConnectionString = (string) ConfigurationSettings.AppSettings["PubsString"];
SqlConnection myConnection = new SqlConnection(ConnectionString);

The continuing adventures of a ASP newb

Hi there,

OK - So I have run into a problem. I have created a shopping cart, the cart is an object that gets created when the user logs in. That all works great. My problem is this.

I have a page for viewing the cart, what I want to do is loop through the cart and show the details for all the items. I mean I could just bind it to a datagrid view (I think) but I would like a little more control over that. The problem is if I loop through my array and say print some HTML it prints it first thing on the page :( That of course doesn't work... How can I get it to put my HTML where I want it? Like inside of a DIV tag?

Being a total newb to ASP programming I am not sure what the best approach to something like this is. But there has to be a lot of cases where a web page has some sort of object of varying length and it needs to be printed to the page in some fashion.

Can anyone point me in the right direction?

ThanksPlace an asp label with runat =server within the div tag. Then send the html output to it in the code behind:

<div>
<asp:Label runat="server" id="myLabel"></asp:Label>
</div>

Then in the code behind:
myLabel.Text = ...

F
Hi there,

OK - So I have run into a problem. I have created a shopping cart, the cart is an object that gets created when the user logs in. That all works great. My problem is this.

I have a page for viewing the cart, what I want to do is loop through the cart and show the details for all the items. I mean I could just bind it to a datagrid view (I think) but I would like a little more control over that. The problem is if I loop through my array and say print some HTML it prints it first thing on the page :( That of course doesn't work... How can I get it to put my HTML where I want it? Like inside of a DIV tag?

Being a total newb to ASP programming I am not sure what the best approach to something like this is. But there has to be a lot of cases where a web page has some sort of object of varying length and it needs to be printed to the page in some fashion.

Can anyone point me in the right direction?

Thanks
That was a very fundamental ASP.NET question. Are you sure you should be creating a shopping cart? :ehh:

Because of the nature of your question, I take it you don't have a lot of knowledge of the ASP.NET controls. First thing to remember, do not use Response.Write. That's something from the classic ASP days which you should rarely ever need to use.

Tutorial:
http://www.asp.net/Tutorials/quickstart.aspx

Thursday, March 22, 2012

The first application gives server load error

I'm new to asp.net. Started following a book, I created a FirstApplication and when i try to run it on the browser it gives me the server parse error 'firstapplication.global file not loaded'. Error line 1.
I have not changed anything except for adding a header in the global.aspx file in between the form tags. also the application did'nt create the .vsdisco file. Heard vs2003 does'nt create one. Does it have to do anything with it. Help please!!!!!!!!!!!a header in global.aspx ?
global.aspx to my knowledge isnt used for anything other than writing
applicaiton onstart... on end... session on start and on end etc...
you just write methods for each in global file.
remove the header (cause i dont know y you are adding that header)
open the code file... gloabal.aspx.cs or vb

save the project... build it... and run it...

HTH

HD

"BSL" <anonymous@.discussions.microsoft.com> wrote in message
news:C4D05D3F-F9B6-44F2-B649-A78B81844844@.microsoft.com...
> I'm new to asp.net. Started following a book, I created a FirstApplication
and when i try to run it on the browser it gives me the server parse error
'firstapplication.global file not loaded'. Error line 1.
> I have not changed anything except for adding a header in the global.aspx
file in between the form tags. also the application did'nt create the
..vsdisco file. Heard vs2003 does'nt create one. Does it have to do anything
with it. Help please!!!!!!!!!!!

The first application gives server error

> I'm new to asp.net. Started following a book, I created a FirstApplicatio
and when i try to run it on the browser it gives me the following server parse erro

----
Could not load type FirstApplication.Globa

<%@dotnet.itags.org. Application Codebehind="Global.asax.vb" Inherits="FirstApplication.Global"%

Source File :c:\inetpub\wwwroot\FirstApplication\global.asax Line: 1

-------
> I have not changed anything except for adding a header in the webform1.asp
file in between the form tags. Am I missing anything here

Help please!!!!!!!!!!It also did not create any files in the bin directory. n
..dll and .pdb files. Wondering why?
open the global.asax.vb (right click global.asax click view code...)... save
it..

do a recompile of the app... and give it a try...

--
Regards,

HD

"BSL" <anonymous@.discussions.microsoft.com> wrote in message
news:BF9D7CFC-3259-4154-ADF5-7426E52B9F87@.microsoft.com...
> It also did not create any files in the bin directory. no
> .dll and .pdb files. Wondering why?

Tuesday, March 13, 2012

the j in ajax: run javascript method on async postack

hey all,
is there a way to run my javascript method on every async postback?

thanks,
rodcharIts not a "postback", its a callback, and that is where your javascript
callback function is specified, depending on what AJAX framework you are
running.
For example, a typical JSON structure returned from an "AJAX" call would
actually invoke your javascript function by itself, passing in the JSON data
as an argument.

Regarding the "j" in AJAX, that's actually the ONLY letter in the acronym
that makes any sense:

A - asynchronous: not all Remote Scripting calls are async.
J - javascript: yes - all Remote Scripting involves Javascript.
X - Xml: Just about nobody uses XML anymore with AJAX.

I liked it better when it was just called "Remote Scripting". That was 1998.
-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com
"rodchar" wrote:

Quote:

Originally Posted by

hey all,
is there a way to run my javascript method on every async postback?
>
thanks,
rodchar


see the Sys.WebForms.PageRequestManager, it has an endRequest event you
can attach your javascript to.

-- bruce (sqlwork.com)

rodchar wrote:

Quote:

Originally Posted by

hey all,
is there a way to run my javascript method on every async postback?
>
thanks,
rodchar


Howdy,

From top of my head:

<script type="text/javascript">

var requestManager = Sys.WebForms.PageRequestManager.getInstance();

requestManager.add_initializeRequest(IntializeRequ estHandler);
requestManager.add_endRequest(EndRequestHandler);

function IntializeRequestHandler(sender, args)
{
// this function will be called
// before async request is executed

// do soemthing here
}

function EndRequestHandler(sender, args)
{
// this function will be called
// after async request is completed

// do soemthing here
}

</script>

Hope it helps
--
Milosz

"rodchar" wrote:

Quote:

Originally Posted by

hey all,
is there a way to run my javascript method on every async postback?
>
thanks,
rodchar


thanks everyone for the help and clarification.
rod.

"rodchar" wrote:

Quote:

Originally Posted by

hey all,
is there a way to run my javascript method on every async postback?
>
thanks,
rodchar