Current location: Hot Scripts Forums » Programming Languages » Windows .NET Programming » Login.. Hmm....


Login.. Hmm....

Reply
  #1 (permalink)  
Old 01-05-05, 08:53 PM
MistyJoy MistyJoy is offline
Newbie Coder
 
Join Date: Aug 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Login.. Hmm....

Hi yahz everyone. I currently trying using vb c# to do a login coding/form. but i couldn't do any checking on it. I using web part template to do a member login. Anyone able to help me? i have did something out from it but not too sure able to work. Can anyone lend a hand?

i did some coding like this:
-------------------------------------------------------------------------
namespace MemberLogin
{
/// <summary>
/// Description for WebPart1.
/// </summary>
[DefaultProperty("Text"),
ToolboxData("<{0}:WebPart1 runat=server></{0}:WebPart1>"),
XmlRoot(Namespace="MemberLogin")]
public class WebPart1 : Microsoft.SharePoint.WebPartPages.WebPart
{
private string ID;
private string pwd;

// Declare variable for HtmlControls user interface elements
HtmlButton _mybuttonClear;
HtmlButton _mybuttonSubmit;
HtmlButton _mybuttonDisplay;
HtmlInputText _mytextboxid;
HtmlInputText _mytextboxpwd;

//Event handler for clear button
public void _mybuttonClear_click (object sender, EventArgs e)
{
_mytextboxid.Value="";
_mytextboxpwd.Value="";
}

//Event handler for submit button
public void _mybuttonSubmit_click (object sender, EventArgs e)
{
id = _mytextboxid.Value;
pwd = _mytextboxpwd.Value;
if ((id = "abc") && (pwd="abc"))
{
_mybuttonDisplay.InnerText="Hello";
}
else
{
_mybuttonDisplay.InnerText = "Not Hello";
}
}



[Browsable(true),
Category("Miscellaneous"),
DefaultValue(defaultText),
WebPartStorage(Storage.Personal),
FriendlyName("Text"),
Description("Text Property")]
public string Text
{
get
{
return text;
}

set
{
text = value;
}
}

protected override void RenderWebPart(HtmlTextWriter output)
{
output.Write(SPEncode.HtmlEncode(Text));
}
}
-------------------------------------------------------------------------
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
phpbb login integration SR_Ben PHP 4 08-10-06 05:04 AM
Redirect previous 2 pages after login mcrob PHP 5 01-01-05 07:35 AM
FTP client login vs. PHP login kevincompton PHP 1 11-02-04 01:17 PM
Login script for MySQL db conundrum PHP 1 07-29-04 09:35 AM
HELP! Php to login to HTACCESS? godfather PHP 4 03-06-04 12:03 AM


All times are GMT -5. The time now is 02:15 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.