|
Apart from the fact that you probably shouldn't do it this way - In Object Explorer right-click on the database and then select Tasks->Detach...
|
|
|
|
|
hmmmm, i found another article about login control:
http://support.microsoft.com/kb/Q301240[^]
when i do all this, i don't get any error, but i can't login :s nothing happens when i press logon.
What can be the problem of this?
|
|
|
|
|
This article contains some bad practises, for example storing password in plain text, not separating Data Access from business logic or not closing a SqlConnection properly (should be done in a finally block). I also don't understand why simple html controls with runat="server" are used, instead of just using server controls like Textbox or Button . Honestly I'm surprised this was published on a Microsfot site.
To get back to your problem - you didn't describe your problem well enough, so I have no idea what could be wrong. Are you using ASP.NET 1.1 or 2.0? If the latter is the case you might want to consider using the new Membership provider (Google for 'ASP.NET membership', and you'll find many resources about the subject).
|
|
|
|
|
ty for the help, this asp?net membership seems very usefull.
i'm trying to make a login control on a ASP.NET website and also a login control on a Winform, both in C#.
it's difficult for me, but i don't give up
|
|
|
|
|
|
ty for all the info !
my login control for my ASP website works !! I used the ASP.NET membership
|
|
|
|
|
hi friends
how to creat chat window in asp,c#.net
can u help me
regards
saravanan
|
|
|
|
|
you can use system.net and system.io to make chat window in c#
|
|
|
|
|
|
Hi Guys
I am looking for Video streaming component like YouTube which i can integerate in my web application for uploading and sharing videos, can anyone suggest me the resources or the component name with which i can achieve functionality related to video streaming.
Regards
GOurav Verma
Gourav
|
|
|
|
|
i have a situation in which i have to trace the user who have accessed the website!I have not set any option for it.
Does the IIS not automatically maitain this information?
Any other solution to get this information while i have not made configuration for this perpose?
Website is in ASP.net 2.0
|
|
|
|
|
|
Hi
strcmd = "Insert into CreateAccount values('" + txtUname.Text + "','" + txtPass.Text + "','" + txtCPass.Text + "','" + txtEmail.Text + "','" + txtSQuest.Text + "','" + txtSAns.Text + "',;for new line wht i have to write.
'" + ChkEnquiry.Text + "','" + ChkStock.Text + "' ,'" + ChkPayroll.Text + "' )";
I m saving data in CreateAccount table ,I want to save Checkbox 's values like checked or not means in table i want to save 0 or 1, & while saving i want to check condition Checkbox1.checked==true or not tell me how to write code for this.
Plz help me as soon as possible
CARE CAREER
|
|
|
|
|
I am using asp.net with C# .how to move in next line please tell this also.
Thanks
CARE CAREER
|
|
|
|
|
you can take a int variable and set that depending upon your checkbox and further you can use the same variable in your query.
Care Career wrote: for new line wht i have to write
no need to do anything extra it will take care of that automatically.
BTW it is not a good practice to insert the data into database it is open for sqlinjection. You should use stored procedure.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Plz tell me how to create stored procedure for this & how i store daia in this.
& i have written on save click this code .
conn.Open();
if (ChkEnquiry.Checked== true)
{
a = ChkEnquiry.Text;
}
else if(ChkPayroll.Checked==true)
{
b = ChkStock.Text;
}
else if(ChkStock.Checked==true)
{
c= ChkPayroll.Text ;
}
strcmd = "Insert into CreateAccount values('" + txtUname.Text + "','" + txtPass.Text + "','" + txtCPass.Text + "','" + txtEmail.Text + "','" + txtSQuest.Text + "','" + txtSAns.Text + "','" +a.ToString() +"','" +b.ToString()+"','" +c.ToString()+"')";
SqlCommand cmd =new SqlCommand(strcmd,conn);
cmd.ExecuteNonQuery();
this.Controls.Add(new LiteralControl(" alert('Data Saved');"));
ClearTextBoxes();
it gives error it is nt saving.
plz tell as soon as possible
Thanks
CARE CAREER
|
|
|
|
|
You can see this[^] to know how to use stored procedure with asp.net.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Thanks for stored procedur i will go thrugh tht link but in below given code i want Checkbox value like if it is checked then in table it should store 1 else 0.How i do this .When i write ChkEnquiry.Text ,it gived label Enquiry not its value.
if (ChkEnquiry.Checked== true)
{
a = ChkEnquiry.Text;
}
if(ChkPayroll.Checked==true)
{
b = ChkStock.Text;
}
if(ChkStock.Checked==true)
{
c= ChkPayroll.Text ;
}
strcmd = "Insert into CreateAccount values('" + txtUname.Text + "','" + txtPass.Text + "','" + txtCPass.Text + "','" + txtEmail.Text + "','" + txtSQuest.Text + "','" + txtSAns.Text + "','" +a.ToString() +"','" +b.ToString()+"','" +c.ToString()+"')";
SqlCommand cmd =new SqlCommand(strcmd,conn);
cmd.ExecuteNonQuery();
this.Controls.Add(new LiteralControl(" alert('Data Saved');"));
ClearTextBoxes();
Thanks & Regards
CARE CAREER
|
|
|
|
|
Care Career wrote: if (ChkEnquiry.Checked== true)
{
a = ChkEnquiry.Text;
}
What you want to store here?
You can give here
a = "1";
if a is a string variable.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Thanks Problem is soved
CARE CAREER
|
|
|
|
|
Hi.
not sure if this would work, as I am relatively new:
"CheckBox1.Checked ? 1 : 0;"
Place that in the fields where you want to insert the 0/1 flag.
Hope it helps.
Marquin
|
|
|
|
|
Hi
On save button click event i have written this code:-
but i want ChkEnquiry value not Text. wht to write for this.
plz tell
if (ChkEnquiry.Checked== true)
{
a = ChkEnquiry.Text;
}
if(ChkPayroll.Checked==true)
{
b = ChkStock.Text;
}
if(ChkStock.Checked==true)
{
c= ChkPayroll.Text ;
}
strcmd = "Insert into CreateAccount values('" + txtUname.Text + "','" + txtPass.Text + "','" + txtCPass.Text + "','" + txtEmail.Text + "','" + txtSQuest.Text + "','" + txtSAns.Text + "','" +a.ToString() +"','" +b.ToString()+"','" +c.ToString()+"')";
SqlCommand cmd =new SqlCommand(strcmd,conn);
cmd.ExecuteNonQuery();
this.Controls.Add(new LiteralControl(" alert('Data Saved');"));
ClearTextBoxes();
thanks
CARE CAREER
|
|
|
|
|
Do validation on the textboxes first, pass them as variables to an SP and do the rest.
|
|
|
|
|
You can conver the check box field into Boolean and insert it..
Like
Insert into CreateAccount values('" + txtUname.Text + "','" + txtPass.Text + "','" + txtCPass.Text + "','" + txtEmail.Text + "','" + txtSQuest.Text + "','" + txtSAns.Text + "', " + Boolean.Parse(ChkEnquiry.Checked) + "," + Boolean.Parse(ChkStock.Checked) + ",'" + ChkPayroll.Text + "' )";
Try this one..hope it will helps you
KHATRI
|
|
|
|
|
I wanna save to client browser not save on server.
Can U help me????
this is code save on server:
protected void Page_Load(object sender, EventArgs e)
{
Process MyProc = new Process();
try
{
//MyProc.StartInfo.WorkingDirectory = ;
MyProc.StartInfo.FileName = Server.MapPath(@"pgsql2shp.exe");
MyProc.StartInfo.UseShellExecute = false;
MyProc.StartInfo.RedirectStandardError = true;
MyProc.StartInfo.RedirectStandardInput = true;
MyProc.StartInfo.RedirectStandardOutput = true;
MyProc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
MyProc.StartInfo.Arguments = @" -f download\myabcshp -h 10.0.0.3 -u postgres -P 123456 vietnamairlines " + '"' + "select * from province WHERE id IN(1,2,3,4,67,34)" + '"';
MyProc.StartInfo.CreateNoWindow = true;
MyProc.StartInfo.Verb = "Save";
MyProc.Start();
MyProc.WaitForExit();
}
catch (System.Exception ex)
{
return;
}
finally
{
MyProc.Close();
}
}
|
|
|
|