Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Dynamic contentlink web part

  Asked By: David    Date: Mar 16    Category: Sharepoint    Views: 912

Does anyone know how to dynamically set the xml contentlink for a
web part via vbscript?
I've tried using the following code... but, it basically redirects
the entire page to the dynamically generated page I want.
I would prefer that the content be generated in the web part.

***** start code *****

Function getContent(xmlndPart)
Dim sContent
Dim strUsername, adsUser, group
("LOGON_USER")) , "\", "/")
sContent = "<DIV class=""UserGeneric""><script
language=""VBScript"">" & vbCRLF & " window.Location.HRef
set adsUser = getObject("WinNT://" & strUsername)
for each group in adsUser.groups
if instr(1,lcase(trim(group.name)),"home server") then
sContent = sContent & trim(right(trim
(group.description),7)) & ".aspx"" " & vbCRLF & "</script>"
exit for
end if
sContent = sContent & "</DIV>"
getContent = sContent
End Function

****** end code ******



No Answers Found. Be the First, To Post Answer.

Didn't find what you were looking for? Find more on Dynamic contentlink web part Or get search suggestion and latest updates.