[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 271
  • Last Modified:

dynamic loading of a text or image

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
hiramlight
Asked:
hiramlight
1 Solution
 
Meir RivkinFull stack Software EngineerCommented:
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
 
CodeCruiserCommented:
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
 
hiramlightAuthor Commented:
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Alan WarrenCommented:
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
 
hiramlightAuthor Commented:
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
 
hiramlightAuthor Commented:
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
 
CodeCruiserCommented:
0
 
hiramlightAuthor Commented:
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
 
hiramlightAuthor Commented:
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
 
hiramlightAuthor Commented:
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

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now