|
But I need to get the number of records from the database and display it on the confirmation box.
Like
"Table has 20 records
Do you want to continue?"
|
|
|
|
|
Hi
Add one hidden field in your web app for storing number of records.
On loading web app, get the number of records and assign in a hidden variable. Your message should concatenate with this value.
For eg.,
var vConfirmMsg = "Table has " + document.getElementById('hidden id').innerHTML + " records. Do you want to continue?";
and continue with the code as I gave earlier
var a = confirm(vConfirmMsg)
Hope this is clear
Harini
|
|
|
|
|
What if the situation is like this?
I have a list box in my aspx page. I can select more than one departments from the list box. On clicking the delete button, I should get the number of records in each departments and display the departments and number of recokds in the confirmation box.
Can I use the same method for this situation also?
|
|
|
|
|
What if the situation is like this
I have a list box and I can select more than one departments from the list box. On clicking delete, I should get the number of records for each departments and show the departments and the corresponding active record number in the confirmation message?
|
|
|
|
|
I have created a popup form that is launched when a user clicks a button on a page. Now, if there has been no recent activity on the page and I click the button the popup form enlarges itself and fills the whole page. How can I correct this anomaly? Where should I start looking? The rendering code?
|
|
|
|
|
Hi all,
I trying to access a file on a server using the IUSER. The IUSER has the necessary access on the server, but I still receive a Access Denied Error. What am I doing wrong? Can anyone please help me. I'm using asp(old school).
Many Thanx in advance
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r My Blog: ^_^
|
|
|
|
|
Trying to write files, I assume?
IIRC in your website configuration options, there is a checkbox whether to allow writing files or not. must be checked.
|
|
|
|
|
No, I'm trying to read the contents of the files ...
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r My Blog: ^_^
|
|
|
|
|
still, there is definitely an options there somewhere that allows you to read files. There's a bunch of these optins, like executing scripts (CGI extensions?), reading files, directory browsnig on/off, etc. I'm thinking you need to create a virtual directory for you website, and when creating these optiosn are definitely there.
Oh, and if this is IIS7, I've no idea
|
|
|
|
|
Thank you very much for the help Anton
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r My Blog: ^_^
|
|
|
|
|
Did I help though? Or was I totally off? helps knowing whether my answer was a correct answer, heh. Though I guess it did, as I've spent a great amount of my time fooling with classic ASP back in the day, and I think I remember way too much of things I needed to do it it/for it.
|
|
|
|
|
|
hi i need data grid coding which contains needed steps..
Jus basic data grid coding is enough..
Any help is welcomed..
hi..
|
|
|
|
|
check this out !!!
http://www.tutorialized.com/tutorial/Basics-of-using-DataGrid/6305
Thanks,
Arindam D Tewary
|
|
|
|
|
to arindam thevary..
thank u so much for ur help..
hi..
|
|
|
|
|
Iam developing a web based payroll system using Visual Studio 2005 and
ASP.Net. I would like to have certain clarification on the following line.
I would like to pick employee name from a list which contain multiple
colums with employee name,employee id,department as coumn headers. For this
if I use combobox - it can contain only one column, if I use listview and if
the no of employees are high the selection will become too slow. Can you
suggest any control which will support multiple columns and multiple records
(rows) with an area to enter some text value (employe name) which is to be
serched with in the displayed list ?
I also would like to know about a control (feature ) which supports data
entry in a grid format (rows and columns - Excel like data entry). The grid should suport data entry directly in to a cell. The grid also should suport data binding. I should be able to customise the column/cell format into textbox,combobox, etc. Is there any such inbuilt control available with Visual Studio 2005 ans ASP.Net ? If not, is it advisible to build a user control by ourself or buying a provern third party control ? If third party control is advisable can you suggest a well known and widely used one ?
Rajeev
|
|
|
|
|
amrajeev wrote: I would like to pick employee name from a list which contain multiple
colums with employee name,employee id,department as coumn headers. For this
if I use combobox - it can contain only one column, if I use listview and if
the no of employees are high the selection will become too slow. Can you
suggest any control which will support multiple columns and multiple records
(rows) with an area to enter some text value (employe name) which is to be
serched with in the displayed list ?
Why don't you use datagrid ? You can put textbox or any other control in columns.
amrajeev wrote: I also would like to know about a control (feature ) which supports data
entry in a grid format (rows and columns - Excel like data entry). The grid should suport data entry directly in to a cell. The grid also should suport data binding.
For this also i prefer using datagrid. Add template column for adding controls like textbox, label or dropdown. When binding you can set the value for these controls
|
|
|
|
|
how to create pdf file using ASP.Net without third party tools or components? ..
I need Code to be written for that....
Any help will be greatly appreciated...
Varun Khanna
|
|
|
|
|
Simply, PDF document has its own native format which is not supported by any programming language as a default. You MUST have to use 3rd party component for creating PDF documents from your application.
If you come across any solution without any 3rd party solution, you can beat Adobe and other competitors and then please do share it with me (atleast)!
|
|
|
|
|
use builtin utility of crystal report
Regards,
Sylvester G
sylvester_g_m@yahoo.com
|
|
|
|
|
Hi All ,
I am working with Asp.net 2.0 C# and my database is SQl 2005 .I hve a problem with putting Login Validation . I want tht when user enters username and Password it should be verified with database if ID PWD matches then user should be logged in and if it doesn't match then it should give login failed . Can u plz pass on d code if possible .
Thanks in advance
|
|
|
|
|
1. Write sql query string to get ID of user and fill dataset if username and password wont be matched it returns value 0.If ID is 0 give msg that Login Failed otherwise it successed.
2. U can also check that if ds.rows.count==0 return false for login failed otherwise true.
Best Regards
Pathan
|
|
|
|
|
I have given this code
<title>WebForm1
Login:
| <asp:textbox id="txtUserName" runat="server" width="160px"><asp:requiredfieldvalidator id="rvUserValidator" runat="server" controltovalidate="txtUserName" errormessage="You must supply a Username!"
="" display="None"> | Password:
| <asp:textbox id="txtPassword" runat="server" width="160px" textmode="Password"><asp:requiredfieldvalidator id="rvPasswordValidator" runat="server" controltovalidate="txtPassword" errormessage="Empty Passwords not accepted"
="" display="None"> | <asp:button id="cmdSubmit" runat="server" text="Submit" borderstyle="Solid"> |
|
<asp:validationsummary id="Validationsummary1" runat="server" width="472px" displaymode="BulletList"> |
|
<asp:label id="lblMessage" runat="server" width="288px" font-bold="True" font-italic="True"
="" font-size="Medium" forecolor="#C00000">
<asp:label id="lblMessage2" runat="server" width="288px" font-bold="True" font-italic="True"
="" font-size="Medium" forecolor="#C00000">
and my code behind is
private void InitializeComponent()
{
this.cmdSubmit.Click += new System.EventHandler(this.cmdSubmit_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private void cmdSubmit_Click(object sender, System.EventArgs e)
{
if (Page.IsValid)
{
if (DBConnection(txtUserName.Text.Trim(), txtPassword.Text.Trim()))
{
FormsAuthentication.RedirectFromLoginPage(txtUserName.Text, false);
}
else
{
lblMessage.Text = "Invalid Login, please try again!";
}
}
}
private bool DBConnection(string txtUser, string txtPass)
{
SqlConnection myConn = new SqlConnection(ConfigurationManager.AppSettings["strConn"]);
SqlCommand myCmd = new SqlCommand("sp_ValidateUser", myConn);
myCmd.CommandType = CommandType.StoredProcedure;
SqlParameter objParam1;
SqlParameter objParam2;
SqlParameter returnParam;
objParam1 = myCmd.Parameters.Add("@UserName", SqlDbType.VarChar);
objParam2 = myCmd.Parameters.Add("@Password", SqlDbType.VarChar);
returnParam = myCmd.Parameters.Add("@Num_of_User", SqlDbType.Int);
objParam1.Direction = ParameterDirection.Input;
objParam2.Direction = ParameterDirection.Input;
returnParam.Direction = ParameterDirection.ReturnValue;
objParam1.Value = txtUser;
objParam2.Value = txtPass;
try
{
if (myConn.State.Equals(ConnectionState.Closed))
{
myConn.Open();
myCmd.ExecuteNonQuery();
}
if ((int)returnParam.Value < 1)
{
lblMessage.Text = "Invalid Login!";
return false;
}
else
{
myConn.Close();
return true;
}
}
catch (Exception ex)
{
lblMessage2.Text = ex + "Error Connecting to the database";
return false;
}
}
}
protected void Page_Load(object sender, EventArgs e)
{
}
}
I m not able to rectify d error . This code neither give error nor does it show me d output.
|
|
|
|
|
Hi Guys
I have developed a web application in which I have an admin folder.I want to protect that folder.After logging in the admin users must be redirected to a page under that folder and not to the default page of the web application.If you have any coding or suggestions related to this issue ,please send it
Thanks
|
|
|
|
|
If you are using FormsAuthentication to do your login, you can enter a bit into the web.config:
<configuration>
<location path="Admin">
<system.web>
<authorization>
<deny users="?"/>
</authorization>
</system.web>
</location>
</configuration>
This means that it will deny access to any unknown users (the deny users="?") who try to access the path /Admin/
|
|
|
|