Answers for "How to make one of the options to be select when load the page angular"

PHP
2

how to get the link of the current page in php

<?php  
    if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on')   
         $url = "https://";   
    else  
         $url = "http://";   
    // Append the host(domain name, ip) to the URL.   
    $url.= $_SERVER['HTTP_HOST'];   
    
    // Append the requested resource location to the URL   
    $url.= $_SERVER['REQUEST_URI'];    
      
    echo $url;  
  ?> 
Posted by: Guest on March-04-2020
0

How to set the value to be selected in the dropdownlist in mvc

•	Here , Model is a dynamic object and from that modal we are 
	fetching States property which is of list type.
•	Here , employee is an employee object and from that object
	we are fetching state property which is of string type.
@foreach (var S in Model.States)
            {
                if (S.StateName == employee.State)
                {
                    <option value="@S.StateName" selected="selected">@S.StateName</option>                             
                }
                else
                {
                    <option value="@S.StateName">@S.StateName</option>                             
                }
            }
Posted by: Guest on May-07-2020

Code answers related to "How to make one of the options to be select when load the page angular"

Browse Popular Code Answers by Language