|
Hello Friends,
Can we apply javascript validation in Login Control. In login control it requires UserName and Password. If we don't enter UserName and Password and click the Submit or click button then it must ask for the UserName and Password in alert function(s)...........
|
|
|
|
|
just write this code on button click(at Code Window)
if(username.Text!="" && passsword.Text!="")
{
here login process
}
else
{
string focusScript = "<script language='javascript'>alert('UserName or Password incorrect ");</script>";
Page.RegisterStartupScript("FocusScript", focusScript);
}
|
|
|
|
|
Hello Friends,
I'm using "Login" control provided by the Toolbox.
And also you're using username.Text and password.Text.........
Where we find the button click.
I think this control doesnot provide click().......
Plz explain.......
|
|
|
|
|
i am doing project in ASP.Net as front end and SQL is my back end i need coding for username and password for login area.
waiting for the reply
|
|
|
|
|
SqlConnection con;
SqlCommand cmd;
SqlDataReader dr;
string pvtConnStr;
string trck = "";
pvtConnStr = here give ur connection String;
con = new SqlConnection(pvtConnStr);
try
{
con.Open();
cmd = new SqlCommand("select username,password from user_table", con);
dr = cmd.ExecuteReader();
if (dr.HasRows)
{
while (dr.Read())
{
if (UserName.Text == dr[0].ToString() && PassWord.Text == dr[1].ToString())
{
Response.Redirect("Default.aspx");
}
}
Label2.Visible = true;
Label2.Text = "InValid User Access";
}
//Response.Redirect("Default2.aspx");
con.Close();
}
catch (Exception ex)
{
Label2.Visible = true;
Label2.Text = "Problem connect to Database";
}
it works perfectly
|
|
|
|
|
You shouldn't just give someone a complete solution to their problem when they clearly haven't made any attempt to solve it themselves. By doing this, you are just fostering a culture of dependency and discouraging the poster from thinking for themselves.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
A.Jebamalai Robinson wrote: i need coding for username and password for login area.
You are in wrong place. No one here will provide you a source code. Read forum guidelines before posting a question.
|
|
|
|
|
i want to open modal file open dialog box on click of the button as we get in fileupload control.
can anyone help me in this.
|
|
|
|
|
try this-
Button1.Attributes.Add("onclick", "window.showModalDialog('MyPage.aspx',null,'dialogHeight:285px;dialogWidth:635px;center:yes;resizable:yes;status:no;help:no; ');");
|
|
|
|
|
I want to window which comes when we click the browse button on fileuploader control.
The code you had given i tried with that before. But it is only a window.
|
|
|
|
|
hi there,
Since you are using ASP.net 2.0 then you most probably using in Visual Studio 2005. Then there is "FileUpload" asp button which provide all your need. FileUpload button has two components one is textbox and other is browse button. On click of browse button you will see open file dialog box and by selecting appropriate fill, you see file path in textbox.
Just try.
Thanks & Regards
Dilip kumar vishwakarma
|
|
|
|
|
Hi all
can anybody tell me how to access profile's properties described in web.config.
I write this code in web.config
<profile defaultprovider="MySqlProvider">
<providers>
....
<properties>
<add name="FirstName" type="String">
<add name="LastName" type="String">
Now,I want to access these properties in my code.
when I write like this -
Profile.FirstName = "AAA";
It gives an error for "FirstName".
can anybody tell me how to access these properties.
thanks.
|
|
|
|
|
Hi all
can anybody tell me how to access profile's properties described in web.config.
I write this code in web.config
....
profile defaultProvider="SqlProvider
providers
....
providers
properties
add name="FirstName" type="String"
add name="LastName" type="String
properties
profile
...
Now,I want to access these properties in my code.
when I write like this -
Profile.FirstName = "AAA";
It gives an error for "FirstName".
can anybody tell me how to access these properties.
thanks.
|
|
|
|
|
Hi All,
I have the following code :
]]>
<title>Untitled PageDefault.aspx.cs
<asp:gridview id="kibrom" runat="server" autogeneratecolumns="False" datasourceid="SqlDataSource1">
<columns> <asp:boundfield datafield="Destination" headertext="Destination" sortexpression="Destination">
<asp:boundfield datafield="MemberID" headertext="MemberID" sortexpression="MemberID">
<asp:boundfield datafield="FlightStatus" headertext="FlightStatus" sortexpression="FlightStatus">
<asp:boundfield datafield="ArrivalDate" headertext="ArrivalDate" sortexpression="ArrivalDate">
<asp:boundfield datafield="FlownMiles" headertext="FlownMiles" sortexpression="FlownMiles">
<asp:sqldatasource id="SqlDataSource1" runat="server" connectionstring="">]]>"
SelectCommand="SELECT [Destination], [MemberID], [FlightStatus], [ArrivalDate], [FlownMiles] FROM [FlightData]">
to automatically refresh a data grid.How ever when i run the page it comes with an error saying
Error occurred: " + err.Message
Can any one help?
Thank you very much
|
|
|
|
|
Hi,
I have 2 different applications, one is forms authentication and the other is windows authentication. I have a link to redirect to the application-2 (Windows authentication) from the application-1 (Forms authentication). I don't want the windows authentication dialog box to appear when clicking the link, so my forms authentication will talk to the active directory using LDAP and verifies the username and password and creates a cookie in the application-1. I need a help, how to set the credential to the windows authentication using forms authentication. My application-2 is BI application, it can work only through windows authentication. Please help!!!
Thanks
|
|
|
|
|
I am new entry in asp.net programming with VB.
I did work in VB past two years.
Now I want some help from your knowledge.
I am creating form with three text box using address typing
textbox1 as name
textbox2 as address line 1
textbox3 as address line 2
I type name then press enter key. The cursor go to next textbox2.
How to made it in this action?
In VB do this action using KeyPress event, but how to made in asp.net
Please give your suggestions with sample coding.
Thanking you,
abglorie
|
|
|
|
|
check TabIndex property for controls
siri
|
|
|
|
|
do the follwing steps
step1:
<asp:textbox onkeypress="return change_focus(this);" id="TextBox1" runat="server" width="137px">
step2:
function change_focus(e)
{
var keycode;
if (window.event) keycode = window.event.keyCode;
else if (event) keycode = event.keyCode;
else if (e) keycode = e.which;
else return true;
if( keycode == 13 )
{
document.form1.TextBox2.focus();
}
}
this steps solve ur problem
|
|
|
|
|
abglorie wrote: I type name then press enter key. The cursor go to next textbox2.
How to made it in this action?
hi abglorie,
If you are doing asp.net that means by pressing Enter you call round trip OR make page to visit server. So either you use TabIndex property of textbox or call javascript function on keypress event which changes focus of textboxes. But according to me it's better to use TabIndex property becuase Enter button is important for sever side execution also no need to call javascript function each time after pressing Enter.
Hope you will choose best solution.
Dilip Kumar Vishwakarma
|
|
|
|
|
Hi, I develop a project in ASp.net in my project i use java script function to add textbox value to Dropdownlist when i click ASp.Butoon the Dropdownlist values age disappeared i can't get dropdownlist values how can i get pls help me
sn-asp:TextBox
list-asp:DropDownList
function Button8_onclick()
{
var t
alert("Hai");
//alert(document.form1.elements["dl"].value);
//alert(document.getElementById("sn2").value);if(document.getElementById("sn").value!="")
{
if(document.getElementById("list").value=="1")
{
t = document.getElementById("sn").value
st = new Option(t,t)document.getElementById("snum1").add(st);
}
if(document.getElementById("list").value=="2")
{
t = document.getElementById("sn").value
st = new Option(t,t)
document.getElementById("snum2").add(st);
}
if(document.getElementById("list").value=="3")
{
t = document.getElementById("sn").value
st = new Option(t,t)
document.getElementById("snum3").add(st);
}
if(document.getElementById("list").value=="4")
{
t = document.getElementById("sn").value
st = new Option(t,t)
document.getElementById("snum4").add(st);
}
if(document.getElementById("list").value=="5")
{
t = document.getElementById("sn").value
st = new Option(t,t)
document.getElementById("snum5").add(st);
}
if(document.getElementById("list").value=="6")
{
t = document.getElementById("sn").value
st = new Option(t,t)
document.getElementById("snum6").add(st);
}
if(document.getElementById("list").value=="7")
{
t = document.getElementById("sn").value
st = new Option(t,t)
document.getElementById("snum7").add(st);
}
if(document.getElementById("list").value=="8")
{
t = document.getElementById("sn").value
st = new Option(t,t)
document.getElementById("snum8").add(st);
}
if(document.getElementById("list").value=="9")
{
t = document.getElementById("sn").value
st = new Option(t,t)
document.getElementById("snum9").add(st);
}
if(document.getElementById("list").value=="10")
{
t = document.getElementById("sn").value
st = new Option(t,t)
document.getElementById("snum10").add(st);
}
}
code Window protected void Button10_Click(object sender, EventArgs e)
{
for (int j = 0; j < snum10.Items.Count; j++)
{
//tListt.Items.Add(snListt.Items[j].ToString());
snd[10] = snd[10] + "/" + snum10.Items[j].ToString();
}
}
snd[] string Array
snum1 DropDownlist
modified on Thursday, January 31, 2008 10:49:32 PM
|
|
|
|
|
Hi
Any one can tell me how we can implement "disscussion board" with asp.net
thanks
hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
|
|
|
|
Hi;
I am trying to adapt some code from an article "Editable Nested GridView" by Satya Kanithi, on this site.
In my code I added a third grid, and in it I want to be able to page.
However when I click on a page number my gridview3_PageIndexChanging() event gives me this error
message "No default member found for type Gridview".
What have I failed to do ?
Thanks for any ideas
|
|
|
|
|
Hi,
I am stuck in a prob... I am editing the DataGrid where I have populated the data from DB. Now after editing the particular row I need to update it. I am able to edit but don’t know how to update it as ‘e’(GridViewUpdateEventArgs) is not giving me values...(protected void UpdatingRecord(object sender, GridViewUpdateEventArgs e))
I am copy pasting edit function (which is fine) and Update function which is not working.
protected void EditRecord(object sender, GridViewEditEventArgs e)
{
BindData(); // here I am calling function which opens the DB connection n all...
GridView1.EditIndex = e.NewEditIndex;
GridView1.DataBind();
}
Function not working or donno how to do... where ‘e’ is not giving values.. string 'str' is ‘null’ always...
protected void UpdatingRecord(object sender, GridViewUpdateEventArgs e)
{
//GridView1.UpdateRow(e.RowIndex, true); //this stmt goes into recursion...
GridViewRow row = GridView1.Rows[e.RowIndex];
string str = GridView1.Rows[e.RowIndex].Cells[1].Text; // for the time being hardcoded cell
}
I am getting 'str' as 'null'. Just tell me how to commit the row after editing it to update row coz just now while debugging I got to know that only the row which I am editing is returning ‘null’ but in watch window I changed the rowindex manually to diff row index to see if I am getting values and ‘e’ is showing all values for every column!
regards,
Supriya Tonape
|
|
|
|
|
Hi all,
I have this problem with my visual studio :
When i try execute my code i find :-------
"Unable to connect to visual studio's local web server"--
I have done a new installation howeve it didnot solve the problem.
Please advice
|
|
|
|
|
What Version of Visual Studio you are having?
Did you checked whether IIS is installed in your machine? If it is installed, check whether you have .NET version is properly configured with the IIS.
modified on Friday, February 01, 2008 6:50:41 AM
|
|
|
|