Hiya, i have found some articles from MSDN website maybe some use to my project, but im not familiar with C#, can somebody be so good to convert the code for me into VB.net type, heres the code;
[C#]
<script runat=server>
private void Page_Load(Object Src, EventArgs e)
{
String email = Request.QueryString["UserEmail"];
if( null != email )
UserEmail.Value = email;
}
private void AddUser_Click(Object sender, EventArgs e)
{
if( !Page.IsValid )
{
Msg.Text = "Some required fields are invalid.";
return;
}
DataSet ds = new DataSet();
String userFile = "../users.xml";
FileStream fs = new FileStream(Server.MapPath(userFile),
FileMode.Open,FileAccess.Read);
StreamReader reader = new StreamReader(fs);
ds.ReadXml(reader);
fs.Close();
string hashedpwd =
FormsAuthentication.HashPasswordForStoringInConfigFile
(UserPass.Value, "SHA1");
DataRow newUser = ds.Tables[0].NewRow();
newUser["UserEmail"] = UserEmail.Value;
newUser["UserPassword"] = hashedpwd;
ds.Tables[0].Rows.Add(newUser);
ds.AcceptChanges();
fs = new FileStream(Server.MapPath(userFile), FileMode.Create,
FileAccess.Write|FileAccess.Read);
StreamWriter writer = new StreamWriter(fs);
ds.WriteXml(writer);
writer.Close();
fs.Close();
Response.Redirect("../Default.aspx");
}
</script>
Thanks in advance !