Solved

dynamic loading of a text or image

Posted on 2013-01-30
10
261 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

911 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

22 Experts available now in Live!

Get 1:1 Help Now