0

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;
      }
 }

1 Answer 1

0

Checking the Status of "HttpConext" ? Like this:

    if(HttpContext.Current!=null){

       //......
     }

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

Regards, Raymond

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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