|
I don't think so anybody will write the complete code for you. It will be better if you try it with yourself and then come with the specific doubt you will get which development.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Ok Thankz Sir ..I'll Do that ....
Life is not easy ,let's make it.
|
|
|
|
|
Hi asprajesh, life is not Easy, You can make it easy, we can help, we cant do all the job for you...
At login html page, add one Login Control (named whatever you want, Logeo is this case)
login code behind
at aunthenticate Function
<code>
protected void Logeo_Authenticate(object sender, AuthenticateEventArgs e)
{
try
{
string id_user = Logeo.UserName.Trim();
string pass_user = Logeo.Password.Trim();
string sql = "SELECT coduser, nomuser FROM users WHERE iduser = '" + id_user + "' AND passuser = '" + pass_user + "'";
//This is an connection Example
public SqlConnection conexionExpress = new SqlConnection("server='localhost\\SQLExpress';Integrated Security=true;Initial Catalog=college;User Instance=false");
SqlCommand comandoSql = new SqlCommand(sql, conexionExpress);
string cod_user = "";
string nom_user = "";
//Open database connection
conexionExpress.Open();
SqlDataReader dr = comandoSql.ExecuteReader();
while (dr.Read())
{
cod_user = dr.GetValue(0).ToString();
nom_user = dr.GetValue(1).ToString();
}
conexionExpress.Close();
if (cod_user != "") //The user exist onto database
{
/*Create the session vars
Session["coduser"] = cod_user;
Session["nomuser"] = nom_user;
e.Authenticated = true; //Grant the access
}
}
catch(Exception)//On Login Error
{
e.Authenticated = false;//Confirm that you are out
}
}
<code>
Its almost all the solution, you can based your solution on this
keep Learning and you never will be out of date...
|
|
|
|
|
Hi,
I have developed a WebForm using Datagrid. Firrst column is a bound column ( 5 names )..retrieved from database. remaining columns are item template columns.( 7 week days )
I have used check boxes for the item template columns.So i have 35 Check boxes in the grid, each cell of the grid is having a check box. ( 5*7). I am using a button also.
Now my question is
If I click on that button, It should display the check boxes which are selected under which week days with respective names.
it should be like this
Names Weeks
(if suppose Mon, Fri check boxes are selected related to adcd row under respective week days )
abcd Mon, Fri
xyz Sat, Sun
..... .........
Please help me out.
Thanks in advance,
Libran
|
|
|
|
|
hi again
See i am sending you the sample code but u have to convert it for your requirement.
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim j As Integer = 0
Dim gvr As GridViewRow
For Each gvr In DocumentListGV.Rows
Dim chk As New CheckBox
chk = CType(gvr.FindControl("CheckBoxName"), CheckBox)
If chk.Checked = True Then
j = j + 1
End If
Next
MsgBox(j)
End Sub
by this code you can know how many rows are selected i mean check box are checked?? ok??
make changes and then u can find out solution ok??
Regards,
DJ Rock
|
|
|
|
|
hi all
I am passing value in response.redirect
but i forgot how to get that value when that page is loading??
response.redirect("default.aspx?Id="&value)
Please help me if any one knows it
|
|
|
|
|
string str = Request.QueryString["Id"].ToString()
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hey Thanks man
;);)
|
|
|
|
|
always welcome..
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi,
I want to know how to generate an Atlas postback?
I build controls dynamically on a page, and need a DOUBLE postback for the event handlers to work properly.
So after ie. i changed a dropdown selection, it does partial postback, and then I want to generate another partial postback.
How do i do that?
??OR??
is it possible to call an invisible button's click event inside the update panel through javascript or something?
Plz help
Regards,
Tintin
|
|
|
|
|
e.Item.Cells(3).Controls(0)
in above Controls(0) is Text Box.
what integer will be used for dropdownlist I mean
e.Item.Cells(3).Controls(?)
|
|
|
|
|
|
Hi I am in MCA final sem can any one give a Project code
in asp.net
Lakshman
|
|
|
|
|
Why will anybody give you the complete project which he/she has developed. Inspite you try to develop something to your own and then ask here if you are stuck somewhere. Also it will be beneficial for you as you will get some exposure on development of the applications.
Best Regards,
Apurva Kaushal
|
|
|
|
|
if u need any help or code /project then u can contact me t.gulab@gmail.com or call me on the 09371972329
bye............. friend
|
|
|
|
|
i will give u the asp.net project with nominal charges u can contact me on the 9371972329 say rose
if yes then hurry
bye............................
|
|
|
|
|
hi Krishna,
i have 2-3 sample projects. do u stll want the projects? if so, i will give u the project for ur MCA final sem. but i don't know how to attach the files here in this forum. orelse send me ur email id so that i can send the source code.
Regards,
Rahi
|
|
|
|
|
|
I have a gridview .In gridview, i allow to edit data
Problem :
when User edit and update data.I want to check data input (server side ) .How to do this.
Thank for your help.
|
|
|
|
|
I would like to store a datatable into session in order to display at another aspx file, so how much session can be stored? is it will make system slow because of much of data ?
Best regards,
Chee ken
|
|
|
|
|
It is not good to put huge data in session because it will cause a lot of problem later on. You can opt for some alternative for your requirement if you are having a huge data. BTW if you don't have many records you can put that datatable in session.
Best Regards,
Apurva Kaushal
|
|
|
|
|
You can use all the server free memory. But remember the session, two user with the same session var the free memory is the half for each one.
keep Learning and you never will be out of date...
|
|
|
|
|
if u want to share the data between the 2 users then you can use the aplication object for that otherwise session object is the right way to put the data.
it will not effect the performance of the application.
Pankaj Gupta
(Take it easy)
|
|
|
|
|
Hi,
I am trying to create csv file ,its working fine but problem is its creating on server side, and i want it to create on client machine.
Now i am using this code ,
FileStream sb=new FileStream("C:\\CSVFile.csv", FileMode.OpenOrCreate);
StreamWriter sw = new StreamWriter(sb);
sw.WriteLine("{0},{1},{2},{3}",
1,1000,"City","Cust_Name");
sw.Close();
Please help me,its very urgent.
RoseMary
|
|
|
|
|
Something like this may work:
ASCIIEncoding asciiEncoding = new ASCIIEncoding();
byte[] sendBytes = asciiEncoding.GetBytes( sendText );
MemoryStream memoryStream = new MemoryStream( sendBytes );
Response.ClearContent();
Response.ClearHeaders();
//Response.ContentType = "application/octet-stream";
Response.AddHeader("Content-Length", memoryStream.Length.ToString() );
Response.AddHeader("Content-Disposition", "attachment;filename=bs.bad" );
//Response.Charset = "UTF-8";
Response.BinaryWrite(sendBytes);
Response.Flush();
Response.End();
|
|
|
|