I want to check my url to have a source and redirect to it.
I have a button for add a ListItem, i want where doesn't have a source in URL the page refresh, where have a source in URL --> redirect me to the source..
This is my URL :
http://ue-sps2/TestSite/Lists/linkBi/NewForm.aspx?RootFolder=%2FTestSite%2FLists%2FWayBill&ContentTypeId=0x0100AA8F1829F56BF44B89174066B393D0D0001DE65983974F8844815B824AF22378F0&Source=http%3A%2F%2Fsf%2Dspsdev02%2FTestSite%2FLists%2FWayBill%2FAllItems%2Easpx
code redirect me to
http://ue-sps2/TestSite/Lists/linkBi/NewForm.aspx
I want to redirect me to Source=http%3A%2F%2Fsf%2Dspsdev02%2FTestSite%2FLists%2FlinkBi%2FAllItems%2Easpx
http://ue-sps2/TestSite/Lists/linkBi/AllItems.aspx