Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a custom job definition for which I have created a Description override. I want it to have correct formatting when called via Central administration UI and when seen using Powershell. Does SharePoint/C# have a way to do this?

Proper UI Override

 public override string Description(){
        get{   return "content with <br/> line break"; }
 }

Proper PS Override

 public override string Description(){
       get{   return "content with \n\r line break"; }
 }

Looking for something along the lines of

 public override string Description(){
       get{   
             string str ="content with<br/> line beak";
             If(sender == system.console)
                      str= "content with \n\r line break"; 
            return str;
      }
 }
share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

Checking the Status of "HttpConext" ? Like this:

    if(HttpContext.Current!=null){

       //......
     }

it's may work,but i'm not really sure....

Regards, Raymond

share|improve this answer
    
Great idea, and it works. thank you! –  user13186 Apr 16 '13 at 14:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.