Solved

dynamic loading of a text or image

Posted on 2013-01-30
10
259 Views
Last Modified: 2013-03-04
I did my homework, searching all over the net, and yet haven't found answer for my question. Hopefully you guys have the answer.

I want to display  a small text or even an image dynamically , here is the scenario, a user click  on a button to send some form data , but depending on the data , it may stay on a local sql server or may be send through web service to a data center , who of course take more time , I would like in that  case a small image or text to pop up and warn the user  e.g.: " connected to data center, please be patient" >

Most of what I found is  bind to a click event , but since it is depending on the data it wont work for me. I would like something like,  IF we do this then display that ... I try many different way but so far couldn't make work .....
 coding is VB NET ,

maybe i miss some links on this matter, or the solution is simple and right in front I just dont see it ...
 
Thank you very much for your responses
0
Comment
Question by:hiramlight
10 Comments
 
LVL 42

Expert Comment

by:sedgwick
ID: 38838493
i was using SimpleModal plugin to display small splash screen in the middle of the page to notify user for a long processing.
very easy to use and looks great.
check this here:

simplemodal

to see demo click here:
simplemodal-demos
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
ID: 38838846
I think you would be better off just showing a "Please wait..." message instead of doing if else logic. The reason for that is the logic would be on the server but the control would not return to client until after data has been submitted. If you still want to do if...then logic then you would need to use a framework like SignalR to send notification to client.
0
 

Author Comment

by:hiramlight
ID: 38849226
Hi Code cruiser, I was away for a few days and just back tonight , I give it a try tomorrow, Just had a quick look and  seem it may just do the trick for what i want .
tq,

Alan
0
 
LVL 26

Expert Comment

by:Alan Warren
ID: 38872148
Hi Alan,
You could use an UpdatePanel and an UpdateProgress to display an animated gif and/or some text.
  <asp:UpdatePanel ID="YourUpdatePanel" runat="server" >
    <Triggers>
      <asp:AsyncPostBackTrigger ControlID="YourForm" EventName="Load" />
    </Triggers>
  
    <ContentTemplate>
      <fieldset style="border: none;">
              <asp:UpdateProgress ID="YourUpdateProgress" runat="server" AssociatedUpdatePanelID="YourUpdatePanel" DisplayAfter="0">
                <ProgressTemplate>
                  <asp:Image ID="YourUpdateProgressImage" runat="server" ImageUrl="~/img/indicator.gif" /> Processing...
                </ProgressTemplate>
              </asp:UpdateProgress>
              <asp:FormView ID="YourForm" runat="server" DataSourceID="YourDataSource" >
                <EditItemTemplate>
                  <!-- your form fields -->
                  <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="true" CommandName="Update" Text="Update" ValidationGroup="YourEditValidate"  />
                </EditItemTemplate>
              </asp:FormView>
      </fieldset>
    </ContentTemplate>
  </asp:UpdatePanel>

Open in new window

Alan
0
 

Author Comment

by:hiramlight
ID: 38900594
Hi code cruiser , I want a take  a closer look to signal R , unfortunatly I got a lot of on site call those past couple weeks and this didn't give me much time to work on this project , but I will make a point to do it in the next couple days, I already download Signal R Api ... so if that work for me I give you the point .

I also like to try  alan Warren idea,  UpdatePanel and an UpdateProgress  may work , but want to take a look at signal R first.

Thank you all for your suggestions.

Alan
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 

Author Comment

by:hiramlight
ID: 38900668
when trying to get the package SignalR from NuGet I got that the package Version 0.6.1 is deprecated and to get " Microsoft.AspNet.SignalR" not to sure where to get from ...?
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 38900841
0
 

Author Comment

by:hiramlight
ID: 38911264
thanks" codecruiser,

the package seemt to loadok  but I got thisat the end :

"nstall-Package : Unable to find assembly references that are compatible with the target framework '.NETFramework,Version=v3.5'.
At line:1 char:16
+ Install-Package <<<<  Microsoft.AspNet.SignalR
    + CategoryInfo          : NotSpecified: (:) [Install-Package], InvalidOperationException
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
 
""

we still use 3.5 in this app ... hope that wont be a problem ...

alan .
0
 

Author Comment

by:hiramlight
ID: 38950060
Hi Codecruiser, I think I will be able to achieved what I want to do with SignalR, and actually aother fatures who are interesting,. so thank's for let me know about this and I will give you the point , since it was you who direct in a direction where I can find a solution to my question .

Alan
0
 

Author Closing Comment

by:hiramlight
ID: 38950076
this did not give me directly a solution but instead a direction were not only I can build my own solution but also a serie of tools that I didn't know about, and can be usefull in the future.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now