Click here to Skip to main content
15,893,790 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
I have a button in which i do some functions.
but before that i showed the message box of Yes/No. But when i click Yes Button of Message Box then they didn't hidden at that time when the functioning of save button not commit. and in between if users Click again save button then save button functioning totally corrupted..So i want to use of loading.. please wait.. image or Text.

Thanks In Advance
Posted
Comments
OriginalGriff 22-Mar-12 4:20am    
I'm sorry, but that didn't make much sense.
It's probably a translation / language problem, but in English, that is not understandable.
Please, try again but perhaps give an example?
Use the "Improve question" widget to edit your question and provide better information.
puneetisonfire89 22-Mar-12 4:50am    
sorry sir,but there are many viewer/programmer who understand my question and give solution.
puneetisonfire89 22-Mar-12 4:56am    
i also give you an example. what i exactly want..
That the code of save_Click()
Mbox1.Show("Do U Want to save the record <br/>", "Message Box", "Yes", "No", null, msg.MessageBoxIcons.Asteriks);


now if he click yes then records are saving.. but it take some time.
and message box continuously show on screen.
and major problem is that if the user again click yes button then record again save.. its means 2 entry are saved corresponding one Id.

Hi ,

Use Update Panel and Update Progress to Show Loading Image Like:

XML
<asp:UpdatePanel ID="Upd1" runat="server" UpdateMode="Always">
       <ContentTemplate>

Your ASPX PageContent Here

  </ContentTemplate>
</asp:UpdatePanel>


ASP.NET
<asp:updateprogress id="updProgressMain" associatedupdatepanelid="Upd1" runat="server" >
<progresstemplate>
    <div style="text-align: center; removed: absolute;">
        <img style="position: relative; top: 50%;" src="Images/Load.gif" alt="Loading" height="100px" width="100px" />
    </div>
</progresstemplate>
</asp:updateprogress>

Hope This May Help You.
 
Share this answer
 
v2
hi ,
try the following code:
1) Css Class:
CSS
 .loadingMessageFrame
{
    background-color: #dcdcdc; /*#ffffff;*/
    filter: alpha(opacity=40);
    opacity: 0.4;
    position: relative;
    z-index: 500;
    top: 0px;
    left: 0px;
    border-top: dashed 1px black;
    border-bottom: dashed 1px black;
    border-left: dashed 1px black;
    border-right: dashed 1px black;
}

.Loading_Message
{
    font-size: medium;
    font-weight: normal;
    color: Maroon;
}



2)Code: add the Division tag
<pre lang="text">

<div id="dvLoading"   runat="server" class="loadingMessageFrame" style="height: 270px;   display: none;"/>
        <table width="100%" style="height: 100%; table-layout: fixed;">
            <tr>
                <td align="center" valign="middle" style="height: 100%;">
                    <asp:label id="lblLoadingMessage" runat="server" text="Loading..." cssclass="Loading_Message" </asp:label>
                </td>
            </tr>
        </table>
 </div>


3)Javascript function:

JavaScript
function BtnClick() {
        lLoadingMessage = document.getElementById('<%=lblLoadingMessage.ClientID %>');
        var dvLoading = document.getElementById('<%=dvLoading.ClientID %>');
        var dvMain = document.getElementById('<%=dvMain.ClientID %>');
     
        if (dvMain != null) dvMain.style.display = 'none';
        if (dvLoading != null) dvLoading.style.display = '';

        return true;
    }

4)
ASP.NET
<asp:button id="uxBtn" runat="server" onclientclick="return BtnClick();" >
                                        Text="Submmit" />


hopes this helps for you.
 
Share this answer
 
v4

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