Sandeep,
I’m not 100% sure I understand your question/problem. But I’ll try and answer what I think you’re asking. You have a datagrid and you would like a hyperlink to open a control in a different module on a different page, and pass a parameter too?
Well, just looking at the little bit of code in your post you could try
<asp:HyperLink runat ="server" id="AddColumnDefault15" ImageUrl="~/images/add.gif" NavigateUrl ='<% #NavigateURL(UserTabID,"EditUserCompetency","mid=" & UserModuleId & “,UserCompetencyId=” & usercompentencyid) %>' />
I was under the impression that you need to use <asp:HyperLinkColumn> in a datagrid… but if your link is working so far the above changes might work. With the NavigateURL() function if you want to pass multiple query string parameters you can just keep adding them to your list and DotNetNuke will parse them out.
For example in the link:
http://localhost/sample4.7/User/tabid/55/ctl/EditUserCompetency/mid/371/UserCompetencyId/1/Default.aspx
there are actually 4 query string parameter sets:
tabid = 55 --This is the page ID
ctl = ‘EditUserCompetency’ --This is the control key (same as the ‘key’ of the control in the module definitions)
mid = 371 --This is the module ID
UserCompetency = 1 --This is your custom query string
So, in NavigateURL() you can just keep adding key=value sets separated by commas and DotNetNuke will turn them into key/value/.
Another thing to keep in mind is that if you redistribute the module or install it on a different DNN box, the TabID of your target page won’t necessarily be the same. I don’t know how you’re setting the value of UserTabID but if you’re hard coding it you’ll have some headaches when/if you redistribute. I recommend an admin setting where you can specify the TabID. You can also search for the TabID by name but if there are two pages with the same name or if someone changes the name of you target page it will break the link.
I have a lot more experience doing this with gridview, and can post some gridview examples of using NavigateURL() for hyperlink columns, image buttons, and gridview commands, if your interested. Let me know if you have any other questions.
Nathan Rover