PC Review


Reply
Thread Tools Rate Thread

Ajax, ASP.NET question

 
 
laziers@gmail.com
Guest
Posts: n/a
 
      19th Jan 2008
Hi,
I have a question

this is very simple code:

<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="Label1" runat="server" Text="Label"></
asp:Label>
<asp:Button ID="Button1" runat="server" Text="Button"
onclick="Button1_Click" />
</ContentTemplate>
</asp:UpdatePanel>

</div>
<asp:Label ID="Label2" runat="server" Text="Label"></asp:Label>
</form>

everything is fine, but is there any way to "call" the ajax using <a
href="">button</a> instend of clicking on the button control?

bye
 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      19th Jan 2008
On Jan 19, 7:54*pm, "lazi...@gmail.com" <lazi...@gmail.com> wrote:
> Hi,
> I have a question
>
> this is very simple code:
>
> *<form id="form1" runat="server">
> * * <div>
> * * * * <asp:ScriptManager ID="ScriptManager1" runat="server">
> * * * * </asp:ScriptManager>
> * * * * <asp:UpdatePanel ID="UpdatePanel1" runat="server">
> * * * * * * <ContentTemplate>
> * * * * * * * * <asp:Label ID="Label1" runat="server" Text="Label"></
> asp:Label>
> * * * * * * * * <asp:Button ID="Button1" runat="server" Text="Button"
> onclick="Button1_Click" />
> * * * * * * </ContentTemplate>
> * * * * </asp:UpdatePanel>
>
> * * </div>
> * * <asp:Label ID="Label2" runat="server" Text="Label"></asp:Label>
> * * </form>
>
> everything is fine, but is there any way to "call" the ajax using <a
> href="">button</a> instend of clicking on the button control?
>
> bye


Do you mean you don't want to do a postback, or you want to change a
look of the submit control? If you would add a LinkButton control
instead of the Button, you will see that the output you're getting on
the client is something about <a href="__doPostBack.... which would
trigger a partial postback of the UpdatePanel

Check this link
http://encosia.com/2007/07/13/easily...ng-javascript/
 
Reply With Quote
 
laziers@gmail.com
Guest
Posts: n/a
 
      20th Jan 2008

> Do you mean you don't want to do a postback, or you want to change a
> look of the submit control?

yes
If you would add a LinkButton control
> instead of the Button, you will see that the output you're getting on
> the client is something about <a href="__doPostBack.... which would
> trigger a partial postback of the UpdatePanel
>
> Check this linkhttp://encosia.com/2007/07/13/easily-refresh-an-updatepanel-using-jav...


ok, thx for answare, that helped me

bye
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ajax question Greg Smith Microsoft ASP .NET 2 4th Mar 2009 07:25 PM
Re: ASP.NET 2.0 Ajax Question S. Justin Gengo Microsoft ASP .NET 0 17th Dec 2008 12:38 PM
Re: ASP.NET/Ajax Question Microsoft Newsserver Microsoft ASP .NET 3 18th Jun 2008 12:21 PM
Ajax Question Microsoft Newsserver Microsoft ASP .NET 2 13th May 2008 10:30 AM
.NET and Ajax Question needin4mation@gmail.com Microsoft ASP .NET 2 21st Sep 2005 07:30 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:58 AM.