Jump to content
WAPT Forum
Sign in to follow this  
Guest Max

DOTNET Usercontrol Values as Parameters

Recommended Posts

Guest Max

Hi..

I am recording an aspx page which has usercontrols. The Usercontrol screen has some username and password values. I need to use these as parameters so I can submit them as different iterations.

 

How can I do this. Does WAPT record the usercontrol screen.

 

Thanks

 

Share this post


Link to post
Share on other sites
Guest Max

Hi Angela,

 

As I have said my problem in breif..I want to post it clear

This is the scenario I am working with.

 

1) I enter into our site using login(I get the login paramters in WAPT :) )

2) After I enter there's a screen with usercontrols which can fill the subuserlist.

3) The usercontrols have similar to a registration page.

 

When I record its adding the data to the database.

 

From the recorded script I want to add data using paramters.

 

The problem I have is I dont find the registration page parameters. I am using dotnet 2.0. These are not hidden fields.

 

Waiting for a fast reply.

 

Thanks.

Share this post


Link to post
Share on other sites
Guest angela
Hi Angela,

 

As I have said my problem in breif..I want to post it clear

This is the scenario I am working with.

 

1) I enter into our site using login(I get the login paramters in WAPT :) )

2) After I enter there's a screen with usercontrols which can fill the subuserlist.

3) The usercontrols have similar to a registration page.

 

When I record its adding the data to the database.

 

From the recorded script I want to add data using paramters.

 

The problem I have is I dont find the registration page parameters. I am using dotnet 2.0. These are not hidden fields.

 

Waiting for a fast reply.

 

Thanks.

 

Hi Max,

 

Please let me know if you record a scenario for registration process itself. Also, please attach here (or send to me) your Profile.

 

Share this post


Link to post
Share on other sites
Guest Paul Deen

You don't need to do anything special to handle user controls. They are treated in exactly the same way as any other control, be it on the page, or anywhere else.

 

ASP.NET uses a concept for naming containers, a user control is one.

 

When you do your HTTP POST, you'll post some data, maybe...

 

USERCTRL1_firstName.

 

the USERCTRL1_firstname is the name of the field within your application, so it'll get recorded by WAPT in exactly the same way, so it'll be updated in the viewstate of the response. Be mindful though of making sure you take the __VIEWSTATE and put it in the variable. If the next request is a postback of that data, ensure your __VIEWSTATE hidden field is updated to be the contents of the previous variable, otherwise you'll break the viewstate and your page will fail. The record seems to do this work for you quite well, but I've seen on a number of occassions it records the literal viewstate value, which will cause you problems.

 

Hope this helps.

 

Paul

Share this post


Link to post
Share on other sites
Guest Max

Hi Paul:

 

Thanks for the reply.

 

Do u mean to say the VIEWSTATE contains the usercontrols data. But even there I dont find the usercontrol or value with the name present in ascx file.

 

Thanks,

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×