|
I guess the best way to do this is to create the page in HTML and then convert it to PDF.
There is a free tool here http://code.google.com/p/wkhtmltopdf/[^] but I have not used it myself with C# or so!
Sojaner!
|
|
|
|
|
Maybe you can try this...
itextsharp[]
I don't speak Idiot - please talk slowly and clearly
'This space for rent'
Driven to the arms of Heineken by the wife
|
|
|
|
|
I am using unobtrusive validation to validate a form. It works in most of the browsers - IE7, IE8 in compatibility mode, FF and Chrome. However, in IE8 stand-alone mode, it fires the validation and message is shown. When I go to the field and retype the value there, the browser hangs after the first key press. The error message is not automatically disappearing. This happens for all forms and for all types of validation attributes - Required, Remote or Regular expression.
I am using jquery 1.6.2 and jquery validation 1.9
Could anybody please help me ?
Many thanks,
Madhu
|
|
|
|
|
I will state what the user wants and then I will ask what control would be the best to accomplish this task.
The user wants a list of prepopulated fields for one row in a table. The user does not want me to leave some date fields as editable right off the bat. The user wants to be able to select yes from a droplist to indicate that a 'prepoplated date column value is invalid'. If the date field is incorrect, user want a dropdown field to display so they can enter the correct date.
The following are the options I am considering:
1. I am thinking that I would use a detailsview control. However I am wondering if one of these options are possible with a detailsview control?
a. Can that automatic dropdown field to enter a date possible with a detailsview control? If so, how would you accomplish this task? If not, could I use an accordion ajax control in the appropriate spot for the selected dropdown fields where the date needs to be entered?
b. Since the user wants all the date fields to be readonly initally, could I somehow disable the EditItemTemplate availability initially? When the user clicks on the control that says 'yes', the EditItemTemplate availability could be enabled and the user can change the value at that time only? If so, how would you accomplish this task?
2. If one of these options are not available in a detailsview control, could I accomplish my goal by using a formview control or possibly using a listview control using a single row being displayed? if this is an option, what control would I use and do you have references I can use on how to accomplish this goal?
3. If the above options are not available, the only think I can think to do is to embedded lots of individual standard we controls like a textbox, labeel, and dropdown list boxes within a large asp.net table control. I would then use accordion ajax control. However I do not want to use a big asp.net web table control since that is the 'old' style of coding.
|
|
|
|
|
I'm not sure if I completely understand. You want a row of label controls that display some dates, each of which will have a dropdown. When the user selects Yes from the dropdown the label should be changed to a dropdown that contains a list of dates. Correct?
This being the case I would not even consider using any ajax server controls that would require a postback to function. All of this can be handled on the client-side with some JavaScript. Handle the select event of the Yes/No dropdown and hide the label while showing a dropdown in its place. Handle the select event on this dropdown to do the reverse, hide the dropdown and show the label with the selected value. If the date dropdowns all contain the same values you don't even need multiple dropdowns. You can have one and clone it or position it as necessary.
The question though is how are you planning to post the updated data, if any, to the server?
rachel_m wrote: that is the 'old' style of coding.
Explain this? The table element was created to display tabular data. If that is what you have then use it. If you are using it just for layout, then no, there are better methods.
No comment
|
|
|
|
|
The following is in response to your questions and I few extra items to mention:
1. There are two webpages. The first webpage (that I did not mention in the first post), will load values into the main master table when the user clicks the next button to go to the second webpage (the page I have a question about). The first page will load data the user enters, set all the default values in appropriate columns.
The first page will also load various dates into the master table based upon the 'process date' the user enters on the first web page. The 'process date' is the key to a default schedule table due date schedules that are customers are suppose to follow. (The default tables may need to be changed in master table if the customer(s) submit work past the expected due date).
2. in response to your statement, "I'm not sure if I completely understand. You want a row of label controls that display some dates, each of which will have a dropdown. When the user selects Yes from the dropdown the label should be changed to a dropdown that contains a list of dates. Correct?" no.
For each of the 5 default dates that can be entered, there will be the following:
a. There will be a textbox field displaying what the value should be entered into the master table. There will be another column that will be a dropdown list asking if the applicable date is invalid. The assumption is no dates are invalid.
(In the database, there is a column for date1 and in the database there is also a yes-no column for date1. There is a column for date2 and there is a yes-no column for date2. This applies for the other 3 date fields and their corresponding yes-no columns.)
So if the user clicks the dropdownlist to say date1 is invalid, they want an extra textbox to show up where they can enter the correct date. The user does not want to be allowed to enter the 'corrected date' accidently. They want to be able to only enter the correct date when they click the dropdown control saying the date is invalid.
3. In response to your statement," This being the case I would not even consider using any ajax server controls that would require a postback to function. All of this can be handled on the client-side with some JavaScript. Handle the select event of the Yes/No dropdown and hide the label while showing a dropdown in its place. Handle the select event on this dropdown to do the reverse, hide the dropdown and show the label with the selected value. If the date dropdowns all contain the same values you don't even need multiple dropdowns. You can have one and clone it or position it as necessary."
a. I was thinking of using all server controls since these two webpages are used by only one or two users for 3 to 5 days monthly. The webpages are being setup since they are a requirement by our customers.
b. Since this is my first set of web pages that i am every writing can you tell me what kind of javascript commands you recommend that I use?
4. In response to your statement,"The question though is how are you planning to post the updated data, if any, to the server?". If the user says any of the dates are invalid from the dropdown list controls, I plan on updating the database. I am told that the answer saying the value is invalid should occur only between 5 to 20% of the time.
5. In repsonse to your statement," Explain this? The table element was created to display tabular data. If that is what you have then use it. If you are using it just for layout, then no, there are better methods.". I want to use a detailsview control.
I am required to have a way for the user to only be able to edit dates if they enter yes in the dropdown list control. They do not want to be able to edit dates if they do not select yes from the dropdown list. Thus I am trying to find an asp.net 2010 web control that will meet this requirement.
|
|
|
|
|
As you are new here let me explain a few things. You don't need to say "In response to your...". Notice the button with the text "Quote Selected Text". Highlight something in the response and click this button; you will get this...
rachel_m wrote: In response to your
Another example
rachel_m wrote: The first webpage (that I did not mention in the first post)
To get the best answer and not need multiple responses to clarify points you should include all pertinent details. And do so as succinctly as possible, long posts will be ignored by most as they don't have time to read everything.
rachel_m wrote: In the database, there is a column for date1 and in the database there is also a yes-no column for date1
Why do you need to persist the yes/no? How is that relevant? What happens when a user changes the value? Yes the date is valid but No it was updated from the original? Will you store the original date? Where will you store it? How many modifications will you store?
IMO having a dropdown for a yes/no to edit a field is very cumbersome and not user friendly. Having a button that says Edit would be more appropriate. If you have five textboxes on the form and only two people that use the form, then train them to not change the date unless they want to. Some problem are best solved with humans not more technology. A textbox with a calendar like this[^] would be fine. The date won't be changed unless the user clicks in the box to display the calendar. The interface could even be displayed as a modal window rather than moving to a new page then back again. A much more pleasing user experience and a more modern design. You worry about old school controls but still use old school techniques.
rachel_m wrote: I was thinking of using all server controls since these two webpages are used by only one or two users for 3 to 5 days monthly.
The number of users and days they are expected to use the application doesn't determine the design or the controls that should be used. The functionality and requirements determines that. You do have documented requirements and designs right?
rachel_m wrote: what kind of javascript commands
There are no JavaScript commands. There are JavaScript functions that you write or you make use of JavaScript frameworks, such as JQuery[^]. You should learn which technology is best for which purpose. Making use of all server controls, although valid, is not necessary in all cases. To show or hide an element it is not necessary to make a round trip to the server to set
myControl.visibility=false; this can be done much better and faster on the client with
$("#myElement").hide()
rachel_m wrote: If the user says any of the dates are invalid from the dropdown list controls, I plan on updating the database
Well, yes, of course. But how? Labels will not be included in the post data for the form, only input controls such as textboxes. Have you considered asynchronous methods, such as AJAX? Displaying the interface as a modal dialog and using AJAX to post any updated values would be a more pleasing user experience, IMO, and more performant since you are only posting what is absolutely necessary, not using a sledge hammer ASP.NET postback method.
rachel_m wrote: this is my first set of web pages
Ever? Is there anyone in your company mentoring you or assisting with this?
No comment
|
|
|
|
|
Hey .. has anyone had a problem with updating the width of asp:Panel control in a web form, under Windows 7. This same web form code worked fine in Windows XP. But in Windows 7, the width never shows up visually as being widened.
Thanks .. Rick
|
|
|
|
|
guys;
I am using a hidden input to store the selected value of a custom control that represent a drop-down. the control works well after the Page is loaded on the server, but in a certain case i would need to get the selected value(the value of the hidden input) during Page.Init which returns String.Empty .
I used both Input.Value and Request.Form(input_name) with no use.
thank you;
Help people,so poeple can help you.
|
|
|
|
|
I am guessing this is most likely because the page is still rendering at this point.
since you are putting this information into a control I am assuming it is not attached to any kind of data with security issues so will a session variable not work?
as if the facebook, twitter and message boards weren't enough - blogged
|
|
|
|
|
But Sir;
I used a System.Web.UI.WebControls.DropDownList for the same case and it worked.
Help people,so poeple can help you.
|
|
|
|
|
I didn't read the other posts, but that's never going to happen.
Page.Init occurs earlier in the page life cycle than Page.load.
You create controls that can postback in page.Init
And you populate your controls with data in page.load
So your trying to get a value from an server object before data is even assigned to it.
There is no reason to get data in page.init.
|
|
|
|
|
jkirkerx wrote: that's never going to happen.
will, it happend in KaSha(the company in which i work).
anyway i made a work around to solve this case.
thank you;
Help people,so poeple can help you.
|
|
|
|
|
how to remove List (of ) remove, compare?
I have List (of user) . User my class with.
Dim users as new list (of User)
Dim user as user
user.name="test"
users.???(user)delete
|
|
|
|
|
|
I am wondering if you can tell me how to link (wire together) an update button to a detailsview control in a C# asp.net 2010 web page?
I have dragged a detailsview control on to this new web page and I have connected the detailsview control to a linq data source control. I have changed several boundfields to template fields and indicated which template fields are editable by setting the readonly property to false. I have also dragged a button control on to the webpage and I have clicked on the button control so the delegate handler is setup.
However I can not seem to connect the update button to the detailsview control. Thus can you tell me what else I need to do?
|
|
|
|
|
some sample code as to where you are having the problem would be very helpful.
did you define a handler for the button click event?
as if the facebook, twitter and message boards weren't enough - blogged
|
|
|
|
|
Hi freinds i have database and I tablles for Users and there Roles is there any Design pattern for authentication for custom database.
WANTED wasim khan(Killed 50 Innocent Buggs, Distroyed 200 Exception, make 5 Project Hostage) any Compnay Hire him will pay 30,000. Best place where u can get him is Sorcim Technologies Murre Road RWP
|
|
|
|
|
This is a very good post and talks about custom provider. This should be helpful
Click here
|
|
|
|
|
Thnx Brij
Thats what i was looking for.
WANTED wasim khan(Killed 50 Innocent Buggs, Distroyed 200 Exception, make 5 Project Hostage) any Compnay Hire him will pay 30,000. Best place where u can get him is Sorcim Technologies Murre Road RWP
|
|
|
|
|
SIMPLY INTRODUCED WHAT IS SILVERLIGHT?
shubham vijay
|
|
|
|
|
At least you should have asked this question in Silverlight[^] forum.
Before that you should have Googled[^] about that.
Start with MSDN[^]
BTW don't use ALL CAPS(means shouting) in internet.
|
|
|
|
|
On my intranet portal,Videos are playing on my system successfully.(Visual studio intalled on my system).But it is not playing on other systems when i host my portal on IIS.But after hosting on my system videos are played.
<embed id='embed1' runat="server" name='mediaPlayer' type='application/x-mplayer2' pluginspage='http://microsoft.com/windows/mediaplayer/en/download/' displaysize='4' autosize='-1' bgcolor='darkblue' showcontrols='true' showtracker='-1' showdisplay='0' showstatusbar='-1' videoborder3d='-1' width='500' height='405' designtimesp='5311' loop='false'>
</embed>
protected void DataList1_ItemCommand1(object source, DataListCommandEventArgs e)
{
try
{
if (e.CommandName == "select")
{
embed1.Attributes.Add("src", @"http://~/Uploads4/");
embed1.Attributes.Add("filename", Server.MapPath(e.CommandArgument.ToString()));
this.modal1.Show();
}
}
catch (Exception ex)
{
Response.Write(ex.ToString());
}
}
What problem can be?
modified 14-Nov-11 5:47am.
|
|
|
|
|
You have to convert the server file location to a qualified url
I wanted to give you an example, but I couldn't find it.
So you build a string, it can be virtual
/Movies/moviename.mpg
or hard code it
http://servername.domainname/movies/moviename.mpg
by the way, movie object have 2 sets of parameters, <embed /> is for firefox, and <object> is for ie.
check your object code for the latest version and update it.
|
|
|
|
|