Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Need to fix a form to goto

Posted on 2009-07-09
9
Medium Priority
?
313 Views
Last Modified: 2012-05-07
I have a form that I need to put one user
email:m@yahoo.com
user:mathieu
pass:cupryk
In the web config. and when I login it takes be to another page.
What do I need to add to my code.
I have a form that needs to goto another page.
       <form action="default.aspx?mode=submit" method="post" id="login_form" name="login_form">
        <div class="wm_login" align="center">
            <div class="a">
            </div>
            <div class="b">
            </div>
            <div class="login_table" style="margin: 0px;">
                <div class="wm_login_header">Login Information</div>
                <table id="login_table" border="0" cellspacing="0" cellpadding="10">
                    <tr id="email_cont" <%=emailClass%>>
                        <td class="wm_title" style="font-size: 12px; width: 70px;">
                            Email:
                        </td>
                        <td>
                            <input style="width: 99%; font-size: 16px;" class="wm_input" type="text" value=""
                                id="email" name="email" maxlength="255" onfocus="this.className = 'wm_input_focus';"
                                onblur="this.className = 'wm_input';" />
                        </td>
                    </tr>
                    <tr id="login_cont" <%=loginClass%>>
                        <td class="wm_title" style="font-size: 12px; width: 70px;">
                            Login:
                        </td>
                        <td id="login_parent">
                            <nobr>
								<input style="width: <%=loginWidth%>; font-size: 16px;" class="wm_input" type="text" value="" id="login" name="login" maxlength="255" 
									onfocus="this.className = 'wm_input_focus';" onblur="this.className = 'wm_input';" />
								<span id="domain"><%=domainContent%></span>
							</nobr>
                        </td>
                    </tr>
                    <tr>
                        <td class="wm_title" style="font-size: 12px; width: 70px;">
                            Password:
                        </td>
                        <td>
                            <input style="width: 99%; font-size: 16px;" class="wm_input wm_password_input" type="password"
                                value="" id="password" name="password" maxlength="255" onfocus="this.className = 'wm_input_focus wm_password_input';"
                                onblur="this.className = 'wm_input wm_password_input';" />
                        </td>
                    </tr>
                    <tr>
                        <td class="wm_title" style="font-size: 12px; width: 70px;">
                            &nbsp;</td>
                        <td>
                        <span class="wm_login_button">
                            <input class="wm_button" type="submit" id="submit" name="submit" value="Login" /></span></td>
                    </tr>
                </table>
            </div>
            <div class="b">
            </div>
            <div class="a">
            </div>
        </form>

Open in new window

0
Comment
Question by:mathieu_cupryk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 1

Expert Comment

by:CahitEy
ID: 24817334
you could send the user to login page with

login.aspx?returnurl=xxxx.aspx

it will return the user to the xxx.aspx
0
 
LVL 1

Expert Comment

by:CahitEy
ID: 24817346
or you could use response.redirect("xxx.aspx") after the login command
0
 

Author Comment

by:mathieu_cupryk
ID: 24817390
where do I put this?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Expert Comment

by:CahitEy
ID: 24817417
you could add this to code behind
response.redirect("xxx.aspx")


or you could add this to the
login.aspx?returnurl=xxxx.aspx

which page is linking to the login page
0
 

Author Comment

by:mathieu_cupryk
ID: 24817590
I have page1.aspx
0
 
LVL 1

Accepted Solution

by:
CahitEy earned 2000 total points
ID: 24817621
so if your login page =  login.aspx

try to link this page as login.aspx?returnurl=page1.aspx

this is first solution other is double click to the login button on visual studio's design view of your login page and then add this line

response.redirect("page1.aspx")

both methods are works
0
 

Author Comment

by:mathieu_cupryk
ID: 24817650
did u look at my form?
0
 
LVL 1

Expert Comment

by:CahitEy
ID: 24817804
what about this one?
       <form action="page1.aspx" method="post" id="login_form" name="login_form">
        <div class="wm_login" align="center">
            <div class="a">
            </div>
            <div class="b">
            </div>
            <div class="login_table" style="margin: 0px;">
                <div class="wm_login_header">Login Information</div>
                <table id="login_table" border="0" cellspacing="0" cellpadding="10">
                    <tr id="email_cont" >
                        <td class="wm_title" style="font-size: 12px; width: 70px;">
                            Email:
                        </td>
                        <td>
                            <input style="width: 99%; font-size: 16px;" class="wm_input" type="text" value=""
                                id="email" name="email" maxlength="255" onfocus="this.className = 'wm_input_focus';"
                                onblur="this.className = 'wm_input';" />
                        </td>
                    </tr>
                    <tr id="login_cont" >
                        <td class="wm_title" style="font-size: 12px; width: 70px;">
                            Login:
                        </td>
                        <td id="login_parent">
                            <nobr>
                                                                <input style="width: ; font-size: 16px;" class="wm_input" type="text" value="" id="login" name="login" maxlength="255" 
                                                                        onfocus="this.className = 'wm_input_focus';" onblur="this.className = 'wm_input';" />
                                                                <span id="domain"></span>
                                                        </nobr>
                        </td>
                    </tr>
                    <tr>
                        <td class="wm_title" style="font-size: 12px; width: 70px;">
                            Password:
                        </td>
                        <td>
                            <input style="width: 99%; font-size: 16px;" class="wm_input wm_password_input" type="password"
                                value="" id="password" name="password" maxlength="255" onfocus="this.className = 'wm_input_focus wm_password_input';"
                                onblur="this.className = 'wm_input wm_password_input';" />
                        </td>
                    </tr>
                    <tr>
                        <td class="wm_title" style="font-size: 12px; width: 70px;">
                             </td>
                        <td>
                        <span class="wm_login_button">
                            <input class="wm_button" type="submit" id="submit" name="submit" value="Login" onclick="" /></span></td>
                    </tr>
                </table>
            </div>
            <div class="b">
            </div>
            <div class="a">
            </div>
        </form>

Open in new window

0
 

Author Comment

by:mathieu_cupryk
ID: 24817821
i need to modify the config to check the email username password.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

715 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