Jump to content


DOTNET Usercontrol Values as Parameters


  • Please log in to reply
5 replies to this topic

#1 Guest_Max_*

Guest_Max_*
  • Guests

Posted 28 July 2008 - 10:09 PM

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


#2 Guest_Max_*

Guest_Max_*
  • Guests

Posted 29 July 2008 - 03:42 PM

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 smile.gif )
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.

#3 Guest_angela_*

Guest_angela_*
  • Guests

Posted 31 July 2008 - 09:30 AM

QUOTE (Max @ Jul 29 2008, 10:42 PM) <{POST_SNAPBACK}>
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 smile.gif )
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.


#4 Guest_Paul Deen_*

Guest_Paul Deen_*
  • Guests

Posted 01 August 2008 - 01:14 PM

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

#5 Guest_Max_*

Guest_Max_*
  • Guests

Posted 12 August 2008 - 03:03 PM

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,


#6 Guest_Max_*

Guest_Max_*
  • Guests

Posted 14 August 2008 - 02:51 PM

Hi,

How it behaves if controls are inside Update panal.

Thanks







0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users