|
|
Cool
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
i'm trying to create a dynamic and auto refreshing web page in which there is a bar graph which is updated based on the data in a data base.
so i want a good graphics plugin for asp.net2.0.
i've seen the article here on "jqurey" and "Creating Dynamic Graphs in ASP.NET using GDI+" but i want another plugin. please help if u know one! plz ur help means a lot!
plz tell me which one to use. does flash work good for this? if so how can i use it & how can i get it free? thanks alot !!
|
|
|
|
|
antew wrote: i've seen the article here on "jqurey" and "Creating Dynamic Graphs in ASP.NET using GDI+" but i want another plugin.
why is that? Does the jQuery plugin not good enough for your problem? or is that does not solve it?
antew wrote: plz tell me which one to use. does flash work good for this?
May be, But as far as I know it is not free.
|
|
|
|
|
I want to use the login Controls on Users That are in My SQL Server database user table. How do I authenticate user based on the users table in SQL Server? I don't want to use Stored procedures also. I am using Linq to entity database.
Thanks.
|
|
|
|
|
|
I am making an editable Gridview and it gets filled with data. When I click my Edit button I have some textboxes that are populated with the "old" data. I type in "new" different data. I have a line of code like this:
TextBox txtUpdateHours = (TextBox)gvwDetails.Rows[e.RowIndex].FindControl("txtHours");
string newHours = txtUpdateHours.Text;
However the newHours variable is always the "old" value, not what I just typed in. How can I get the "new" value? I know it must be simple but I am trouble finding what I need. Thanks for any help.
|
|
|
|
|
rebind your grid data source after updating.
Padmanabhan
|
|
|
|
|
Thank you for the response. I'm not sure this will help my problem because it seems to be occuring *before* the update...I set breakpoints on the Update function and I can see it is updating with the original values, not what I just typed in the textbox. No matter what I type in the textbox it retains the original values from the data source and I'd like the Update to use what I just typed in. I'm not sure why it's doing this.
|
|
|
|
|
is your code placed within
if (!Page.IsPostback) ?
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
Yes that was it, thanks so much.
|
|
|
|
|
Hi guys I am currently working on a web application where people can fill out information in a timesheet, and then it will store that information on a database, and then send a link to it to payroll
by email.
This is the current code that I have
Dim msgs As New MailMessage
msgs.To = SupervisorEmailGet()
msgs.From = "Payroll@server.ca"
msgs.Subject = NameTextBox.Text & " Hours for " & Session("date")
msgs.BodyFormat = MailFormat.Text
msgs.Body = "Employee: " & NameTextBox.Text & ControlChars.NewLine & "Department: " & DepartmentDropDownList.SelectedItem.Text & _
ControlChars.NewLine & "Supervisor: " & SupervisorDropDownList.SelectedItem.Text & _
ControlChars.NewLine & "The supervisor of " & NameTextBox.Text & " has viewed their time sheet." & _
" You can view the employees hours at the website shown: http://ServerHostName/TimeSheet/NewTimeSheet.aspx?ID=" & intNewId
SmtpMail.SmtpServer = "smtp.bellnet.ca"
SmtpMail.Send(msgs)
msgs = Nothing
it works but the person I am working on it for wants the web app to open up their Microsoft Outlook 2007 with a new mail window(like a mailto , but wants the information filled in dynamically through the program. The reason why they want to have a mail window is just because outlook runs locally, or if the person filling out the timesheet needs to change the body of the email.
If anyone knows how to do that I would be happy or if you know how to get the code up top to run locally I would be more than satisfied with that.
modified on Wednesday, May 27, 2009 4:03 PM
|
|
|
|
|
Found it out Here it is for anyone else that wants to know.
Dim msgs As New MailMessage
msgs.To = SupervisorEmailGet()
msgs.From = "Payroll@server.ca"
msgs.Subject = NameTextBox.Text & " Hours for " & Session("date")
msgs.BodyFormat = MailFormat.Text
msgs.Body = "Employee: " & NameTextBox.Text & ControlChars.NewLine & "Department: " & DepartmentDropDownList.SelectedItem.Text & _
ControlChars.NewLine & "Supervisor: " & SupervisorDropDownList.SelectedItem.Text & _
ControlChars.NewLine & "The supervisor of " & NameTextBox.Text & " has viewed their time sheet." & _
" You can view the employees hours at the website shown: http://ServerHostName/TimeSheet/NewTimeSheet.aspx?ID=" & intNewId
SmtpMail.SmtpServer = "ServerHostName.smtpname.ca"
SmtpMail.Send(msgs)
msgs = Nothing
ServerHostName = the name of the server hosting the website.
smtpname = The smtp of the server. i.e. smtp.BELLNET.ca
|
|
|
|
|
Hi there,
I need to prevent possible db injection attacks, I have proper validation strings in the form to replace potentially harmful characters, however there seams to be something built into .NET that screams when it sees the angle bracket followed by the word "script" before it performs any validation or string replacement function. I know hackers use these errors to thier advantage, so how can I keep the site from breaking at all if someone attempts to use this tactic to inject my database? The only solution I can think of is to use a custom generic error page - that of course reveals no info - but the fact that an error occured does.
Any suggestions? - Thanks!
|
|
|
|
|
You may want to add a validateRequest="false" in the page directive to disable the validation, and use SQL parameters to prevent potential SQL injection.
Also, read about cross site scripting (XSS) while at it b/c your may be vulnerable to it too.
|
|
|
|
|
User Parameterized queries and stop assuming that the user is feeding your application the correct data. Look at this
Introduction to SQL Injection [^]
Hope it Helps
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hi
I have a grid view and on mousehover of each row of row of gridview, i want to display the data dynamically as tooltip showing details of row . The details may change from time to time.
I want to get them from database.
Thanks in advance
Usha
|
|
|
|
|
In OnRowDataBound event you could add javascript to get this effect
(e.Row.Style.Add())
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
Hi All
I have a web site for my client and each department is given a login id and password which is maintained in sqlserver2005 database. All the employees in that department login should login with the same id and password. Now i want to know which employee has logged in into the site.
U may question that each employee can be given each username and password which makes the work simple. But that is not my requirement.
I want to know user name of the employee who has logged in into the desktop from asp.net web page so that i can use that name in website. This site is used only within the organisation
Is there any way ?
I would be very happy if i get a solution for this.
Regards
Usha
|
|
|
|
|
nainakarri wrote: All the employees in that department login should login with the same id and password. Now i want to know which employee has logged in into the site.
|
|
|
|
|
You can use the logon_user server variable:
string logonUser = Request.ServerVariables["LOGON_USER"].ToString()
In order for the LOGON_USER variable to be populated, the user must be authenticated using either Basic or NT Challenge/Response security in IIS. If you have Anonymous Access the LOGON_USER variable will be blank. Hope that helps.
|
|
|
|
|
Hi,
I'm currently creating a site that I want to include an online data storage system that can automatically add bulk data from a spreadsheet.
I want the user to upload an excel document containing a table with the same fields as my online (MSSQL server) database and have the site add each row of the spreadsheet added to the database automatically.
I have other needs too like the obvious need to avoid repeat values without loss of data but for now I just need to know where to look to get the upload of data from an excel spreadsheet part working.
Does anybody know what sort of things I should be researching to get this sort of functionality as I'm not sure where to start?
I hope all that made sense.
Thanks
Andy
|
|
|
|
|
My suggestion:
1) Create a method where you will prompt the user for the Excel document to upload.
2) Upload the .XLS to a "working" directory giving it a unique name (include a timestamp)
3) Have a background process open the .XLS document, process the records, create an error log and when finished move the document to an "archive" folder.
4) You can create this background process as a scheduled task that gets run on your IIS server, periodically checking the "working" directory for .XLS files to process.
Sound good ?
|
|
|
|
|
When you say spread sheet if you mean csv file it will be easier then if it is an xls file. If csv give the user the means to upload the file to the server. I've used the asp .net control for uploading which seems to work out well. Once uploaded use the filestream class to open the csv file, parse through the file for the data items, and insert them into your database.
If the files are xls you will have to do Excel automation to pull out the data from the spread sheet. You can to this client side or server side. If client side the user will need to have Excel installed. You also may have to worry about what version they have. If you do it on the server your version is not a problem but using server resoucres could be a problem if multiple people will be uploading at the same time. For server side you will have to setup a service application to process the xls files.
|
|
|
|
|
When my page loads the code behind queries the database and populates some asp labels. When the user interacts with the page java script changes the values of the asp labels on the page. When the user clicks the save button the code behind is supposed to write the changes to the lables back to the database. But the changes never get written back because I think the server side never sees the changes on the client side. Instead when the page reloads before the click event code runs the new values of the labels are replaced with original values from the server. How would I get the changes from the client side back to the server side in order to update the database correctly?
|
|
|
|