I an new learner of asp.net and vb.net. I am trying to convert .aspx lines of code into .aspx.vb code
The following two lines of URL making code are now written in .aspx page. I want to write these lines of code in .aspx.vb page.
.aspx page
<%= Employer.CareersUrl%>?_mj=<%= Vacancy.ID & "-" & Vacancy.Title.Replace(" ", "-")%> <br/> http://cs.mypbiz.com<%= Microsite.AppRelativeBaseUrl.TrimStart("~")%>/<%=Vacancy.ID%>-<%= Helper.TruncateString(Vacancy.Title.Replace(" ", "-"), 30, "")%>.aspx
I want to write these above two lines of URL making code in .aspx.vb page like the following line
Private Function MakeUrl(ByVal vacancy As Vacancy) As String If Not String.IsNullOrWhiteSpace(Employer.CareersUrl) Then 'Return Helper.ResolveUrL("~/candidate/jobs/detail.aspx?vacancy=" & vacancy.ID & "&utm_source=RSS+link+backs&utm_medium=RSS&utm_campaign=RSS") ElseIf Not IsNothing(Microsite) Then Return ("portals.mypbiz.com/candidate/jobs/detail.aspx?vacancy=" & vacancy.ID & "&utm_source=RSS+link+backs&utm_medium=RSS&utm_campaign=RSS") End If End Function
I have written necessary property and function in the aspx.vb file to inherit the class behaviour . but not being able to write URL properly.
Forgive my ignorance. I know very little of asp.net and vb.net coding