Solved

MVC4  if statemtnt to dialog box

Posted on 2014-01-30
2
312 Views
Last Modified: 2014-07-30
Please help
  I have an "Else" Statement in C# that I want to add a link that " when clicked" calls  my dialog box.  I tried looking online for help but could not find any. I am sure it is easy but I cant find the answer.
  I have attached my code  and would appreciate any help I can get.
                  Please Help
30Jan14.txt
0
Comment
Question by:vcurtis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 21

Accepted Solution

by:
Craig Wagner earned 500 total points
ID: 39824484
Seems like something like the following should do it.

@if (Model.MeasureVersionDate != DateTime.MinValue)
{
    @Model.MeasureVersionDate.ToShortDateString();
}
else
{
    <a href="#" id="selectDate" name="selectDate">Click here to select a date</a>
} 

$(function() {
    $('#selectDate').click(function(){   
        $( "#timeret" ).dialog({
            height: 140,
            modal: true
        });
    });
});

Open in new window

0
 

Author Comment

by:vcurtis
ID: 40230203
nicely done
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

734 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