meenu
 Nuke Ace Posts:48
 |
| 01 Mar 2008 4:37 AM |
|
hi all
pls help me soon.
in dnn 04 08 i added one link.when i click that link one another website will come in a new window.in that website i want current dnn login name .how? |
|
|
|
|
jncraig
 Nuke Master II Posts:2034
 |
| 01 Mar 2008 9:33 AM |
|
You can put the username in the query string with the link.
So, if the link is included in a Text/HTML module, you can use the new Token Replacement feature in that module pass the username. You could put the link in the Text/HTML module as:
http://www.website.com?username=[User:Username] |
|
Joe Craig DNN Creative Support Subscribe to the website |
|
|
meenu
 Nuke Ace Posts:48
 |
| 01 Mar 2008 11:22 PM |
|
dear friend
thank you very much. i got this point. in url i done like this . www.website.com?username=[User:Username]
but in that coming website button click i want to show this username as message box how? |
|
|
|
|
jncraig
 Nuke Master II Posts:2034
 |
| 01 Mar 2008 11:46 PM |
|
| If you want to grab the username in the target website, you'll have to process the query string in that website. |
|
Joe Craig DNN Creative Support Subscribe to the website |
|
|
meenu
 Nuke Ace Posts:48
 |
| 02 Mar 2008 12:18 AM |
|
dont feel bad i have not much experience in this field. i am using vs 2005.dnn 04 08
how i will process the query string? can u tell me the steps?pls... |
|
|
|
|
meenu
 Nuke Ace Posts:48
 |
| 08 Mar 2008 12:59 AM |
|
pls i am troubling lot can u help me.... |
|
|
|
|
jncraig
 Nuke Master II Posts:2034
 |
| 08 Mar 2008 11:28 AM |
|
If you are inexperienced with programming in ASP.NET and with DotNetNuke, I would recommend that you get some good books and study them carefully. The book "Professional DotNetNuke 4" by Shaun Walker is a good book. There are a lot of good books about programming in the ASP.NET languages. What you'll get depends on whether or not you want to do your programming in VB or C#.
For the example that you listed, if you want a link to be something like:
www.website.com?username=[User:Username]
You would want to put that link in a Text/HTML module and also check the option for token replacement in the module's settings. Then, when the link is actually rendered the [User:Username] will be replaced by the user's actual username, and that will be passed to the other website in the query string.
In the receiving website, you'll need to have code that decodes the requesting URL and extracts the username. How you do this depends on how you have created the second website. Is it also a DotNetNuke site, or is it something else? |
|
Joe Craig DNN Creative Support Subscribe to the website |
|
|
meenu
 Nuke Ace Posts:48
 |
| 08 Mar 2008 10:51 PM |
|
my module is link module not html module. in that link settings i selected url and location i specified like www.website.com?username=[User:Username]. my second web is coming but actual username is not coming there.
my second web is a mapxtreme website for mapping. i want to pass dnn username and password in that website. that is my pblm.
is any other solution for this pblm??
if it is difficult leave it no pblm.i will find out the solution.
thank u very much 4 ur cooperation... |
|
|
|
|
jncraig
 Nuke Master II Posts:2034
 |
| 09 Mar 2008 12:22 PM |
|
| I don't believe that the Links module does token replacement yet. So, I'd suggest that you replace the Links module with a Text/HTML module that does to token replacement. |
|
Joe Craig DNN Creative Support Subscribe to the website |
|
|
meenu
 Nuke Ace Posts:48
 |
|
jncraig
 Nuke Master II Posts:2034
 |
| 10 Mar 2008 7:22 AM |
|
| This works just fine for me: < a href="http://stockcentral.com?username=[User:Username]" >link< /a > |
|
Joe Craig DNN Creative Support Subscribe to the website |
|
|
meenu
 Nuke Ace Posts:48
 |
| 11 Mar 2008 1:15 AM |
|
dear joe i am usibg dnn 04 08,sql 2005 my table name is dbo.users.. my useronline table is empty....
i created text/html module->click edit text->this following link i paste there. < a href="http://192.168.151.15:88?username=[User:Username]" >link< /a > after update i am getting this like < a href="http://192.168.151.15:88?username=Error accessing [User:Username], Username is unknown for datasource User." >link< /a >
the funny part is when i click http://192.168.151.15:88 my site is coming with browser name http://192.168.151.15:88/webform1.aspx?username=User:Username
but when i click "username=Error accessing [User:Username], " this part ur website is coming (http://www.stockcentral.com/) why
i am using dnn 04 08. any other settings is required or not???
i tried this way also < a href="http://192.168.151.15:88?username=[dnn0408].[dbo].[Users]:Username" >link< /a > this time no error is coming.when i click link my web also coming with this http://192.168.151.15:88/?username=Users:Username browser name
my username is lulu y this name is not coming in browser window?
|
|
|
|
|
jncraig
 Nuke Master II Posts:2034
 |
| 12 Mar 2008 8:42 AM |
|
You want to make sure that the link is pasted into the Text/HTML module in "source" mode so that it will be interpreted as HTML code and not text.
Also, you have to go to the Settings page for the module and enable token replacement. |
|
Joe Craig DNN Creative Support Subscribe to the website |
|
|
meenu
 Nuke Ace Posts:48
 |
| 12 Mar 2008 11:32 PM |
|
dear frined i done this in another way. i created one one link module.from that link button click i passed dnn username . joe u r doing a gr8 job.thank u so much 4 ur support.
Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LinkButton1.Click Dim objUser As UserInfo = UserController.GetCurrentUserInfo Dim user4mapping As String user4mapping = objUser.Username Page.ClientScript.RegisterClientScriptBlock(Me.GetType(), "popup", "window.open('http://192.168.151.15:88/webform1.aspx?username=" & user4mapping & "','','scrollbars=no,menubar=no,height=650,width=screen.width,resizable=no,toolbar=no,location=no,status=no')", True) LblUserDisplay.Text = "" LblUserDisplay.Text = "WELCOME TO & " & user4mapping & " & 4 AFTI MAPS.........."
End Sub |
|
|
|
|
jncraig
 Nuke Master II Posts:2034
 |
|