Click here to Skip to main content
15,900,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
ASP.NET
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <triggers>
            <asp:PostBackTrigger ControlID="cmdAdd" /> 
        </triggers>
        <contenttemplate>
     
                                                
<table>
                                                      <td class="style26"><asp:Label ID="Label50" runat="server" Text="Upload">
                                                             </td>
                                                      <td class="style24">
                                                            <asp:FileUpload ID="FileUpload1" runat="server" Width="200px" Font-Names="Tahoma"
                                                                CausesValidation="True" ForeColor="#003399" Height="24px" MaxLength="500" FolderProcessingMode="Upload"
                                                                OnFileUploaded="FileUploaded" /> 
                                                                   <a href="#" önclick="add()">Add<a href="#" önclick="Remove()">Remove</a>
                                                        </a></td>
                                                        </table>

    <table>
    
        <tr id="2" style="display: none">
            
        
            <td class="style26">
                <asp:Label ID="Label7" runat="server" Text="Upload">
                 
            </td>
            <td align="left">
                <asp:FileUpload ID="FileUpload2" runat="server" Width="253px" Font-Names="Tahoma"
                    CausesValidation="True" ForeColor="#003399" Height="24px" MaxLength="50" />
            </td>
            
        </tr>
    </table>
    <table>
        <tr id="3" style="display: none">
            <td class="style15">
                <asp:Label ID="Label4" runat="server" Text="Upload">
                 
            </td>
            <td align="left" class="style27">
                <asp:FileUpload ID="FileUpload3" runat="server" Width="253px" Font-Names="Tahoma"
                    CausesValidation="True" ForeColor="#003399" Height="24px" MaxLength="50" />
            </td>
            
        </tr>
    </table>
     <table>
        <tr id="4" style="display: none">
            <td class="style15">
                <asp:Label ID="Label9" runat="server" Text="Upload">
                 
            </td>
            <td align="left" class="style27">
                <asp:FileUpload ID="FileUpload4" runat="server" Width="253px" Font-Names="Tahoma"
                    CausesValidation="True" ForeColor="#003399" Height="24px" MaxLength="50" />
            </td>
            
        </tr>
    </table>
     <table>
        <tr id="5" style="display: none">
            <td class="style15">
                <asp:Label ID="Label10" runat="server" Text="Upload">
                 
            </td>
            <td align="left" class="style27">
                <asp:FileUpload ID="FileUpload5" runat="server" Width="253px" Font-Names="Tahoma"
                    CausesValidation="True" ForeColor="#003399" Height="24px" MaxLength="50" />
            </td>
            
        </tr>
    </table>
  
    <table>
    
        <tr>
            <td class="style28">
                <asp:Label ID="Label3" runat="server" Text="Keywords">
                </td>
                <td align="left" class="style29">
                    <asp:TextBox ID="keyword1" runat="server" TextMode="MultiLine" Width="327px" Font-Names="Tahoma"
                        CausesValidation="True" ForeColor="#003399" Height="50px" MaxLength="150">
                </td>
        </tr>
   
    </table>
    <div id="tablewrapper">
        <div id="tableheader">
            
            
            <span class="details">
                
                
    <table class="style1">
        <tr>
            <td class="Name" align="center">
                              
                <asp:Button ID="cmdAdd" runat="server" Text="SAVE" Width="84px" Font-Bold="True"
                    Font-Names="Tahoma" Font-Size="X-Small" OnClick="cmdAdd_Click" OnClientClick="showWait" />
                <asp:Button ID="cmdupdate" runat="server" Text="MODIFY" Width="84px" Font-Bold="True"
                    Font-Names="Tahoma" Font-Size="X-Small" OnClick="cmdupdate_Click" />
                <asp:Button ID="cmdDelete" runat="server" Text="DELETE" Width="84px" Font-Bold="True"
                    Font-Names="Tahoma" Font-Size="X-Small" OnClick="cmdDelete_Click" />
                <asp:Button ID="cmdCancel" runat="server" Text="RESET" Width="84px" Font-Bold="True"
                    Font-Names="Tahoma" Font-Size="X-Small" OnClick="cmdCancel_Click" />
                    </td>
        </tr>
        
                     <asp:UpdateProgress ID="UpdateProgress1" runat="server" 
                AssociatedUpdatePanelID="UpdatePanel1">
                <progresstemplate>
                    <asp:Label ID="lblWait" runat="server" BackColor="#507CD1" 
                        Font-Bold="True" ForeColor="White" 
                        Text="Please wait ... Uploading file">
                </progresstemplate>
            
        </table></span></div></div></contenttemplate>




This is my html code is there any mistake or will i have to do anything on serverside(C#)
Posted
Updated 29-Jan-13 22:11pm
v2

need to add <@register namespace="ajaxcontroltoolkit" tagprefix="uc1">
and
<asp:scriptmanager id="scripmanager1" runat="server">
 
Share this answer
 
v2
Comments
Member 9378829 30-Jan-13 4:40am    
i Forgot to post that i have already have <asp:scriptmanager id="scripmanager1" runat="server">
C#
<asp:ScriptManager ID="ScriptManager1" runat="server" />

use this
 
Share this answer
 
v2
Comments
Member 9378829 30-Jan-13 4:40am    
i Forgot to post that i have already have <asp:scriptmanager id="scripmanager1" runat="server"
 
Share this answer
 
can i get the complete code. as code provided by you is working fine as update panel is showing .. please share remaining code.
 
Share this answer
 
Comments
Member 9378829 30-Jan-13 5:03am    
full code means Both asp and html? if so can i send it to your email
Member 9378829 30-Jan-13 5:05am    
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="fileupload.aspx.cs" Inherits="fileupload" %>

<!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 id="Head1" runat="server">
<title>Document Content Center</title>
<link rel="Stylesheet" type="text/css" href="css.css" />
<link rel="stylesheet" type="text/css" href="style.css" />
<script language="javascript" type="text/javascript" src="datetimepicker.js">
</script>
<script type="text/javascript">
{
var ex = /^BA[0-9]{10}$/;
if (ex.test(document.getElementById('txtDoc').value) == false) {
alert("(*)Select Date..!");
}
}
</script>
<script type="text/javascript">
function SelectAll() {
var checkboxes = document.getElementsByTagName("input");
for (i = 0; i < checkboxes.length; i++) {
if (checkboxes.item(i).attributes["type"].value == "checkbox") {
checkboxes.item(i).checked = true;
}
}
}
function deSelectAll() {
var checkboxes = document.getElementsByTagName("input");
for (i = 0; i < checkboxes.length; i++) {
if (checkboxes.item(i).attributes["type"].value == "checkbox") {
checkboxes.item(i).checked = false;
}
}
}

</script>

<script type="text/javascript">
function post() {

__doPostBack('CheckBoxList1', '');
}
function __doPostBack(eventTarget, eventArgument) {

document.form1.__EVENTTARGET.value = eventTarget;
document.form1.__EVENTARGUMENT.value = eventArgument;
//document.form1.submit();

}
function WarningDelete() {
return window.confirm("Are you sure? you want to delete the record ?? ");
}
function loaddata(val) {

document.getElementById("cmdAdd").disabled = true;
document.getElementById("cmdupdate").disabled = false;
document.getElementById("cmdDelete").disabled = false;
document.getElementById("id").disabled = false;

document.getElementById("<%=Label8.ClientID%>").value = document.getElementById("c1" + val + "").innerHTML;
document.getElementById("<%=CheckBoxList1.ClientID%>").value = document.getElementById("c2" + val + "").innerHTML;
document.getElementById("<%=drp_id.ClientID%>").value = document.getElementById("c3" + val + "").innerHTML;

document.getElementById("<%=txtOwnerId.ClientID%>").value = document.getElementById("c5" + val + "").innerHTML;
document.getElementById("<%=keyword1.ClientID%>").value = document.getElementById("c6" + val + "").innerHTML;
document.getElementById("<%=id1.ClientID%>").value = val;

document.getElementById("cmdAdd").disabled = true;




post();

alert(document.getElementById("<%=Label8.ClientID%>").value);


}



</script>
<script language="javascript" type="text/javascript">
var atLeast = 1
function Validate1() {

var CHK = document.getElementById("<%=CheckBoxList1.ClientID%>");

var checkbox = CHK.getElementsByTagName("input");

var counter = 0;

for (var i = 0; i < checkbox.length; i++) {

if (checkbox[i].checked) {

counter++;

}

}

if (atLeast > counter) {

alert("Please select atleast " + atLeast + " item(s)");
document.getElementById("<%=CheckBoxList1.ClientID%>").focus();
return false;

}

return tru
hi,

please send the .aspx and .cs to srikanth.pachava@vijaielectricals.com

1) pasted code does not contain any checkbox
2) now you have pasted code contain checkbox and önclick="add()"thsi function is not visible.
 
Share this answer
 
I can't see what you've written and what you missed for that. Only you can debug that and check for the errors. Since you are new to Asp.net, I would like to suggest you to read some good books and articles. Refer the link below for the article:
The UpdateProgress Control of ASP.NET AJAX Extensions[^]
UpdateProgress Control Overview[^]



--Amit
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900