Showing posts with label userid. Show all posts
Showing posts with label userid. Show all posts

Monday, March 26, 2012

passing variable to the Parameter value of ObjectDataSource1?

How do I go about passing the value strUserId to the parameter value of ObjectDataSource1?

// get userid for logged in client
if (User.Identity.IsAuthenticated)
{
strUserId = Membership.GetUser().ProviderUserKey.ToString();
}

In the Configure Data Source wizard it is asking for a Parameter Source in the drop down. And the variable strUserId (in the code-behind for the page) is not an option.

How do I make it one?

hi

you need to set the parameter value in Selecting event of the object datasource :

protected void ObjectDataSource1_Selecting(object sender, ObjectDataSourceSelectingEventArgs e) {this.ObjectDataSource1.SelectParameters[0].DefaultValue = Membership.GetUser().ProviderUserKey(); }


Try setting your Parameter in the ObjectDataSource.Selecting event like so:

protected void ObjectDataSource1_Selecting(object sender, ObjectDataSourceSelectingEventArgs e){e.InputParameters["UserID"] = Membership.GetUser().ProviderUserKey;}

Thank you Anas,

I double clicked the ObjectDataSource1 in design view and was able to get it started.

I will review your code.

Thanks again.

Update: I actually got the 2nd answer in this thread to work.

Wednesday, March 21, 2012

passthrough login from alternate technology

I have that ability to pass userid and password (encrypted) to a coldFusion
section of a web site. I'm able to decrypt and run the login and continue
through that section of the site. At this time i need to do the same from
Coldfusion to Dot.net.

Given i have an encrypted value passed to Dot.Net that equals a userid and
then i can get the correct password. How or where on any selected page can i
authenticate the user.
2. if this is not possible is there a way to modify my login.aspx to just
run the login and redirect back to that page with these same values?

note: as it is right now the user is redirected to login.aspx with the
encrypted value.

--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kesI figured out a way to do it using the current login.asx page and the
re-direct from login, but i would really like to hear what eanyone else has
to say on this.

Please reply
KES
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes

"WebBuilder451" wrote:

Quote:

Originally Posted by

I have that ability to pass userid and password (encrypted) to a coldFusion
section of a web site. I'm able to decrypt and run the login and continue
through that section of the site. At this time i need to do the same from
Coldfusion to Dot.net.
>
Given i have an encrypted value passed to Dot.Net that equals a userid and
then i can get the correct password. How or where on any selected page can i
authenticate the user.
2. if this is not possible is there a way to modify my login.aspx to just
run the login and redirect back to that page with these same values?
>
note: as it is right now the user is redirected to login.aspx with the
encrypted value.
>
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes

Friday, March 16, 2012

passthrough login from alternate technology

I have that ability to pass userid and password (encrypted) to a coldFusion
section of a web site. I'm able to decrypt and run the login and continue
through that section of the site. At this time i need to do the same from
Coldfusion to Dot.net.
Given i have an encrypted value passed to Dot.Net that equals a userid and
then i can get the correct password. How or where on any selected page can i
authenticate the user.
2. if this is not possible is there a way to modify my login.aspx to just
run the login and redirect back to that page with these same values?
note: as it is right now the user is redirected to login.aspx with the
encrypted value.
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kesI figured out a way to do it using the current login.asx page and the
re-direct from login, but i would really like to hear what eanyone else has
to say on this.
Please reply
KES
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes
"WebBuilder451" wrote:

> I have that ability to pass userid and password (encrypted) to a coldFusio
n
> section of a web site. I'm able to decrypt and run the login and continue
> through that section of the site. At this time i need to do the same from
> Coldfusion to Dot.net.
> Given i have an encrypted value passed to Dot.Net that equals a userid and
> then i can get the correct password. How or where on any selected page can
i
> authenticate the user.
> 2. if this is not possible is there a way to modify my login.aspx to just
> run the login and redirect back to that page with these same values?
> note: as it is right now the user is redirected to login.aspx with the
> encrypted value.
> --
> thanks (as always)
> some day i''m gona pay this forum back for all the help i''m getting
> kes