문제

pseudocode :

  1. declare a variable
  2. store Return url in that variable.
  3. if variable is not equal to null redirect to returnurl
    else redirect to homepage.

can someone give me C# asp .net code for the above mentioned pseudocode as I'm completely new to progamming world???

도움이 되었습니까?

해결책

   string url="http://www.google.co.in/?gws_rd=cr" // variable declaration and assigning url to variable 

    if(url !="")           // checking the string variable is empty or not 
  {
Response.Redirect(url);    // variable is not empty redirect to given URL

} 

else

{
Response.Redirect(HOMEPAGE URL);   // else redirect to given home page

}

try this and let me now. it will helpful

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top