Sir,
below is my html code:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="ajax.aspx.vb" Inherits="ajax" EnableEventValidation="true" ViewStateEncryptionMode="Always" EnableViewStateMac="true"%>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register assembly="System.Web.Ajax" namespace="System.Web.UI" tagprefix="asp" %>
<%@ Register assembly="MSCaptcha" namespace="MSCaptcha" tagprefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<center>
<form id="form1" runat="server">
<cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" EnablePartialRendering="true"></cc1:ToolkitScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<table cellpadding="0" cellspacing="10" border="0" width="500">
<tr>
<td align="center">
<asp:FileUpload ID="FileUpload1" runat="server" /></td>
</tr>
<tr>
<td align="center" valign="top">
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<cc1:CaptchaControl ID="ccontrol" runat="server" BackColor="#474747"
CaptchaBackgroundNoise="none" CaptchaFontWarping="Medium" CaptchaHeight="35"
CaptchaLength="6" CaptchaLineNoise="Medium" CaptchaWidth="160"
Font-Bold="False" FontColor="White" Height="35px"
NoiseColor="IndianRed"
style="font-size: small; font-family: Arial, Helvetica, sans-serif; float:left"
Width="160px" CaptchaChars="ACDEFGHJKLNPQRTUVXYZ2346789"
EnableTheming="False" />
<asp:Button ID="Button2" runat="server" Text="Refresh" CssClass="btn btn-xs btn-danger" />
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Button2" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
</td>
</tr>
<tr>
<td align="center" valign="top">
<asp:Button ID="Button1" runat="server" Text="Reset"/></td>
</tr>
</table>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="Button1" />
</Triggers>
</asp:UpdatePanel>
</form>
</center>
</body>
</html>
In above html code i have used two update panels. First panel is for whole form, second update panel is for MS Captcha and Refresh button. I want to change captcha code on click of button.
On button click the captcha code is changing but still it refreshes fileupload browsed file, and make it blank. Even though I have used AsyncPostBAck for refresh button. Is there a feasibility to change ms captcha with out refreshing the filupload control? OR refresh mscaptcha with any javascript method?