|
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/
|
|
|
|
|
Yes.Thanks. After logging in , it redirects to the default page of the web application.But I want to redirect the Admin Users to a form or page inside this protected folder.
Thanks
jith
|
|
|
|
|
If you have a defaultUrl= in your authentication settings, it will redirect to that page after login.
<authentication mode="Forms">
<forms name=".ASPXAUTH" loginUrl="login.aspx" timeout="20"
protection="All" slidingExpiration="true" defaultUrl="/Admin/MyAdminPage.aspx"/>
</authentication>
ChrisB
|
|
|
|
|
Hi ChrisB
Thanks it works.
Bye
Jith
|
|
|
|
|
Hi Guys,
I want to swap 2 gif images automatically at the time gap of 6 secs in the header banner,of ASP.NET web application.If anybody knows the coding for this reply or give your suggestions.
Thanks
|
|
|
|
|
Hi
You can use AJAX for this. Add Timer control and add Timer_Tick event to swap images.
Hope you got it.
Harini
|
|
|
|
|
Why would you need Ajax for this? That would be a bit over board.
It can easily be done in Javascript using the setTimeout function. Set this to a function reference in the onload event, the function will swap the image.
window.onload = function(){ setTimeout('imageSwap', 6000); }
var swap = true;
function imageSwap() {
var img = document.getElementById['imageElId'];
if(swap) { img.src = 'newimage.jpg'; swap = false; }
else { img.src = 'oldimage.jpg'; swap = true; }
}
Thats off the top of my head so I'm sure it'll need some tweaks.
|
|
|
|
|
hi badgrs,
i tried this code.But there is no property,method or event called window.removed.
Thanks
jith
-- modified at 5:54 Friday 9th March, 2007
|
|
|
|
|
It should be onload , it gets removed by CP for security reasons.
|
|
|
|
|
|
"header banner" means exactly whats exactly you are talking about !!!
Is that something two image control's image you want to swap periodically ???
Thanks,
Arindam D Tewary
|
|
|
|
|
Yes and I don't want mouseover or mouseout events
Thanks,
jith
|
|
|
|
|
Any particular reason why you can't use an adrotator control? That would seem to be the simplest...
Other than that, all you need to do is set up a function to toggle the images...something like...
function rotateImage()
{
var currentImage = document.getElementById('myImage').src;
if (currentImage = 'imgage1.gif')
{
document.getElementById('myImage').src = 'image2.gif';
}
else
{
document.getElementById('myImage').src = 'image1.gif';
}
setTimeout ('rotateImage();', 6000)
}
should do the trick - call it once at page load, and it'll just sit there munching away till the page is binned
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|