|
Add 12 hours just to sure
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi,
I've a web application in ASP. I want when a user clicks on button, the data on a particular webpage is saved in a PDF file and the user can append the data in the pdf file.
Any idea?
Thanks
|
|
|
|
|
Legacy ASP, or ASP.Net? You have to find a 3rd-party library to do what you want.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
I actually did just that at one point. I found that the free libraries were crap (didn't render the page as expected). The way I got around it was to use a Windows Forms WebBrowser to render the page (on the server side), render that control to a bitmap (WebBrowser.DrawToBitmap), save that bitmap as a PNG, embed that PNG into a PDF (the free libraries seem to be capable of at least this), then return that PNG to the browser as raw byte data (this will help you figure that out). I also remember having to do some custom HTML parsing to print each page neatly. It's tricky, but can be done (took me 2-4 days IIRC). Google for anything above you don't know how to do (e.g., you can google for free PDF libraries).
Driven to the ARMs by x86.
|
|
|
|
|
I want to convert xml file to pdf using C#.Can u please help me to do this
|
|
|
|
|
|
Hi,
Increase And Decrease Width of GridView Column on Mouse Darging , please suggest me better way
Regards,
Vishnu.
|
|
|
|
|
hi,
vishnukamath wrote: Increase And Decrease Width of GridView Column on Mouse Darging
You can use ExtJs.net.It will solve your issue, check the demo
http://examples.ext.net/[^]
|
|
|
|
|
To assign width for all column using ItemStyle-Width property with in Item template
|
|
|
|
|
Hi All, I am wondering how to validate date using regular expression and not allowing any future date if the user wants to put it in anyway.
thanks,
|
|
|
|
|
Hi,
no, it's not possible with regular expression, regular expression can only validate patterns, you can use compare validator for this purpose or use .NET function DateTime.Now to acquire todays date, then compare it programmatically with the date from user's input.
Regular expression for date is
(?x)(? [1-9]|1[0-2])(/?)(? [1-9]|[12][0-9]|3[01])(\1)\d{4}\d/\d/\d{4}
|
|
|
|
|
Thank you Iqbal bhi, I will get the user input and then compare with present date in the back end.
thanks for the date format.
|
|
|
|
|
thanks for your reply, I know it can be done using back end Csharp code. But how do I display message to user that something is wrong.
|
|
|
|
|
Just to add to Shahriar Iqbal Chowdhury's answer, you can use the regex validator to do an "idiot check" Client side and use dateTime.TryParse[^] to check server side. There are several attempts to do it here[^] without the regex using JavaScript instead.
For the regex pattern, I've always found http://regexlib.com[^] useful, it also gives a summary of how well well the regex matches etc.
|
|
|
|
|
|
I am doing some research into ftp.
I have developed an website that allows the user to ftp files to a server.
I was just wondering if there are any security implications in doing so?
Any information is much appreciated.
ASP all the way
|
|
|
|
|
You are going to force them to log in ? Right ?
No anonymous connections. You may want to see if there is a method for your FTP server software to limit the amount of data a folder can have uploaded. (Think disk quota)
I would recommend monitoring the FTP destination folder very carefully for abuse; maybe a nightly job that would compare the number of files / size from the night before to the current day and send an email notification if too many files have changed or the file size has changed dramatically. Using a system like this, you won't bother an Admin with yet another email notification.
just some things to think about.
Good luck.
|
|
|
|
|
FTP passes login/password in the clear, so someone could intercept them. Use SFTP, if you can.
Naughty people like to find open FTP locations to upload naughty things. Then they tell their friends where to get those naughty things. Make the upload folder write-only. (If you need to have those files accessible via FTP again, you move them to a downloadable folder, after checking them out either manually or by a process you'll need to create.)
|
|
|
|
|
I have looked into the SFTP, and the only way of really doing this is using 3rd party component although there are some class librarys. Would another alternative be to use SSL and ftp?
ASP all the way
|
|
|
|
|
I'm pretty sure once you hit the FTP protocol it's just going to jump out of the SSL world.
|
|
|
|
|
Appreciate the info. I'll do some more research and come up with a solution looking into SharpSSH which looks promising.
ASP all the way
|
|
|
|
|
Hey there!
Im developing website using asp.net and html mixed.
So I rather chose to use html select tag and checkbox tag. Contact.aspx.cs (code behind) doesn't recognise it because it is html tags. Is there a way to recognise html tags in code behind?? Look at below codes (bold):
Contact.aspx:
id="dlist1" onchange="swapImage1()">
Faith Card
Grace Card;
Blue
Contact.aspx.cs:
msg += "Name: " + txtName.Text; // fine
msg += "<br>Surname: " + txtSurname.Text; // fine
msg += "<br>Email: " + txtEmail.Text; // fine
msg += "<br>Order:" + HtmlTextWriterTag.Select.ToString("dlist1"); // belong to select tag
msg += "<br>Order:" + HtmlTextWriterTag..... // belong to checkbox tag - how?
mail.Body = msg;
mail.BodyEncoding = System.Text.Encoding.ASCII;
Hope you can help fix it! Your help much appreciated. It is urgent. Thank you!
|
|
|
|
|
Add the runat="server" attribute to the html tags and use the corresponding controls from the System.Web.UI.HtmlControls namespace.
|
|
|
|
|
I followed your instruction. According to the result runat="server" attribute in the html tags is error.
Look at bold codes:
Contact.aspx
id="dlist1" onchange="swapImage1()">
<optgroup label="Sow Seeds of Love">
Faith Card
Code behind:
msg += " Order:" + dlist1.SelectedIndex; OR
msg += " Order:" + HtmlTextWriterTag.Select.ToString("dlist1");
Am I doing right???
|
|
|
|
|
You have not applied the server attribute to the select element
<select runat="server" name="order" size="12" multiple="multiple" style="width:330px;" onchange="swapImage1()">
Notice how this code was also formatted here. Please do the same.
Cyberoxy wrote: According to the result runat="server" attribute in the html tags is error
According to what results?
DO NOT ask for urgent help here. This is a volunteer site and people will answer you on their own time, not yours. Most people who can give you the most help will just ignore an urgent request as it is very rude.
I know the language. I've read a book. - _Madmatt
|
|
|
|