To open new page from current page using APEX

The below code is used to open new page 'AddAllBlog' from current page.

Apex Code:

  public PageReference skip()
  PageReference pg = new PageReference('/apex/AddAllBlog');
  return pg;  

If you give URL as '' instead of '/apex/AddAllBlog', it will open google website.


1 comment:

  1. Really sharing is caring you proved with your blog.And my question is can we pass vf page name as a string through page reference


Sharing is Caring!!! Share this with your friends!!!

submit to reddit