Improve company productivity with a Business Account.Sign Up

x
?
Solved

c# how can webcon trol fill user name

Posted on 2011-02-18
5
Medium Priority
?
336 Views
Last Modified: 2012-05-11
c# how can webcontrol fill user name automatic  fill username(david) and password (1234) in the sign inform

in this case if it have user name teera it should delete it and fill david
<span class="formValue">
        <input id="msuLoginName" name="msuLoginName" value="teera" class="text rightEdge" style="width: 276px; height: 16px;" type="text">
</span>
    </div>
    <div class="formRow">
      <span class="formName">
         <label for="msuPassword">Password:</label>
</span>
      <span class="formValue">
        <input id="msuPassword" name="msuPassword" class="text rightEdge" style="width: 276px; height: 16px;" type="password">
</span>

Open in new window

0
Comment
Question by:teera
5 Comments
 
LVL 5

Expert Comment

by:sameer_goyal
ID: 34931813
Your question is not very clear. Please correct if I understand it wrongly.

You want to know how can you make a user control which includes a textbox for username and a password, automatically. right?

If yes, then you can use properties to do this. In your user control, you need to define public properties which you will populate on the Page_Load of your webpage which uses the user control.

Your property's 'SET' clause should then assign the value to the TEXT property of the textboxes.
Hope it helps.

If this is not what you were looking at, please clarify and i will try to help you out.
0
 
LVL 20

Expert Comment

by:Obadiah Christopher
ID: 34931827
Is it possible to set the textbox tht has a password property from code-behind. I dnt think so.
0
 

Author Comment

by:teera
ID: 34931883
Hi expert
   My job is go to website and post promotion of the shop I need to put user name and password then put my personal information the problem is auto complete pro gram not work well for my language My idea is use c# to fill some information and some in formation some and the rest i fill by myself so I just want some example to do this
0
 
LVL 5

Accepted Solution

by:
sameer_goyal earned 1200 total points
ID: 34931897
Ok, that is very easy.. Do you have the code for the website that you work on? if yes, then you will have to add a method which will pre-fill the webpage with whatever information you want and load it.

For eg. lets say the web page has the following Text boxes:
txtUserName
txtPassword
txtFirstName
txtLAstName
txtAddress
txtPhoneNo

etc

Now in the Page_Load event of the Page, you can call a method, for eg, LoadProfileInformation()

And this method would be like:

private void LoadProfileInformation()
{
DataSet dsNew = new DataSet();

//Some code to fetch information if you store it in a DB else you can put in static info if you may want. //so you will nto need the dataset.

in case of static Info:

txtUserName.Text = "MyUserName";
txtPassword.Text = "MyPassword";
txtFirstName.Text = "MyfirstName";
txtLastName.Text = "MyLastName";

and so on..

}

This should do the trick.

Hope it helps.
0
 
LVL 6

Assisted Solution

by:Ramone_Hamilton
Ramone_Hamilton earned 800 total points
ID: 34932292
I think this depends on what type of site you are talking about, i.e. is this a  site that you are creating or is this an external site.  If this is an external site, and considering the form above only contains htlm controls rather than server controls, you might be much better off using an automation tool like autoIt that can input values based off of physical locations.

If you do have access to the code within this app you have several options, you can use javascript, change the controls to serverside controls and use C#, or just use C# from the jump in the code behind.  
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Watch the video to know the simple way to remove or recover or reset lost or forgotten passwords of Outlook PST file. With Kernel Outlook Password Recovery tool such operation is very easy to perform. It is a freeware with limitation to use with 500…

605 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question