Rob Eastham
 New Member Posts:19

 |
| 12 Jul 2006 09:17 PM |
|
Thanks CrashDome. Luckily my host allows me to switch between .net v1.1 and v2 via my control panel. I switched to V2 and your fix seems to work - thanks! Unfortunately I now have introduced another problem (which I saw at my previous host when they upgraded their server to V2 with no route back to 1.1) and that is that all my textarea fields are defaulting to 20 cols width despite them being defiend as larger in my template. Any ideas Kelly? I did find this thread which I think is related: http://www.dnndev.com/Forums/tabid/215/view/topic/forumid/17/postid/7523/Default.aspx cheers Rob |
|
|
|
|
DNNDev Admin
 Senior Member Posts:6419

 |
| 12 Jul 2006 09:36 PM |
|
Instead of using the columns, try just setting the width.
Best, Kelly
|
|
Power Your Website With XMod Pro Buy XMod Pro Today |
|
|
Rob Eastham
 New Member Posts:19

 |
| 12 Jul 2006 10:16 PM |
|
Hi Kelly
Just tried that with no joy unfortuantely. I tried width="450" instead of cols="40" and it still seems to default to cols=20.
Rob |
|
|
|
|
DNNDev Admin
 Senior Member Posts:6419

 |
| 12 Jul 2006 10:30 PM |
|
Hmmm... I'm not able to replicate it. I created a simple, if ugly, form: <form> format="custom"> <controls> Text Area 1: <textarea ref="TextArea1" cols="80" rows="10"><label>Text Area 1</label></textarea> </controls> </form> And it works fine for me. It also works if this is an auto-layout form. I've even changed "cols" to "columns" and it still works. Kelly |
|
Power Your Website With XMod Pro Buy XMod Pro Today |
|
|
Rob Eastham
 New Member Posts:19

 |
| 13 Jul 2006 12:15 AM |
|
Have now also tried columns in last ditch attempt, but get same issue with width defaulting to 20 cols. If I switch back to .NET 1.1 all is fine but the upload control then doesn't work (even with CrashDome's modified dll) which would be a much bigger problem for my client. I guess I'll stick with .NET 2 and narrow texareas for the moment and hope my client is cool with it until CrashDome's fix is rolled into the next .NET 1.1 comaptible version of XMod 3. Do you think if I upgrade to 4.0 this behaviour might disappear? As ever please let me know if you want me to test any new fixes prior to general release. Rob |
|
|
|
|
Dave Sparks
 New Member Posts:11

 |
| 13 Jul 2006 01:30 AM |
|
I know you are probably looking for any desperate measures right now because I've been where you've been  Try wrapping the whole form in a DIV or even just the textareas. It sounds basic and silly but I had a problem that would just not go away for the life of me and someone suggested the above and WHAM! all better! |
|
|
|
|
Tony Harrison
 Advanced Member Posts:851

 |
| 13 Jul 2006 11:39 AM |
|
Extending fileupload
Hi Kelly, I wondered if you or anyone else can shed some light on this:
I have added an image control to the fileupload CreateChileControls routine -
'add image control Dim imgUpload As New System.Web.UI.WebControls.Image imgUpload.Visible = True imgUpload.ImageUrl = "~/images/folderopen.gif" pnlUpload.Controls.Add(imgUpload)
Then intention is that I will display different .gif images to indicate success or failure of the upload. As you can see from the code I have specified a default image (all the images I use are standard DNN images held in the images folder.) when the control renders this images is displayed as expected. However, when the upload succeeds I try to do the following:
imgUpload.ImageUrl = "~/images/green-ok.gif" imgUpload.Visible = True
lblMessage.Text = _UploadSuccessMsg lblMessage.Visible = True
BindControl()
At this point I get the following error:
A critical error has occurred. Object reference not set to an instance of an object.
Any Ideas?
Thanks |
|
we don't make XMod, we make it better! |
|
|
DNNDev Admin
 Senior Member Posts:6419

 |
| 13 Jul 2006 04:21 PM |
|
It's difficult to diagnose without looking through the code. My initial guess is that you should make imgUpload a class-wide variable and just instantiate it in CreateChildControls (rather than Dim). This will allow that image to be acceessed in your other routines. This is, of course, assuming the imgUpload is the one causing the error.
Best, Kelly
|
|
Power Your Website With XMod Pro Buy XMod Pro Today |
|
|
Rob Eastham
 New Member Posts:19

 |
| 13 Jul 2006 04:32 PM |
|
Thanks for the div tip Kelly - I'm afraid it made no difference to the textarea size though.
Rob |
|
|
|
|
DNNDev Admin
 Senior Member Posts:6419

 |
| 13 Jul 2006 04:43 PM |
|
Hi Rob,
Can you post your form definition?
Best, Kelly
|
|
Power Your Website With XMod Pro Buy XMod Pro Today |
|
|
Tony Harrison
 Advanced Member Posts:851

 |
|
Dave Sparks
 New Member Posts:11

 |
| 18 Jul 2006 10:05 PM |
|
fatgeorge, Is that code working out for you then? I've been using my custom control for two weeks now and have had no issues. I remember you were having issues with the code conflicting (i.e. you needed to use FileInfo). Has this been resolved? Is your commercial control working in medium trust mode? CrashDome |
|
|
|
|
Tony Harrison
 Advanced Member Posts:851

 |
| 19 Jul 2006 09:25 AM |
|
[quote]Posted By CrashDome on 7/18/2006 5:05 PM fatgeorge, Is that code working out for you then? I've been using my custom control for two weeks now and have had no issues. I remember you were having issues with the code conflicting (i.e. you needed to use FileInfo). Has this been resolved? Is your commercial control working in medium trust mode? CrashDome[/quote] Well the changes I made are not having any adverse effects, but I didn't have the problem with Medium Trust anyway. Could you try the latest beta for me and let me know your results? |
|
we don't make XMod, we make it better! |
|
|
Tony Harrison
 Advanced Member Posts:851

 |
| 19 Jul 2006 05:03 PM |
|
Kelly, Could you shed some light on passing form data to the fileupload control? Should I be able to pass variables or form input values to the control before the form is submitted? I am wondering if there is anyway I can expose some of the new parameters of my fileupload control in a form. E.G. the watermark, how could I take the input from a textbox and pass it to the watermark parameter? Thanks |
|
we don't make XMod, we make it better! |
|
|
Tony Harrison
 Advanced Member Posts:851

 |
|
DNNDev Admin
 Senior Member Posts:6419

 |
| 19 Jul 2006 05:37 PM |
|
Hey fatgeorge,
You could use the BeforeFormSave() event. In that you're passed the PortalModuleControl. From there you would need to find the control in question using ASP.NET methods and get its value.
Best, Kelly
|
|
Power Your Website With XMod Pro Buy XMod Pro Today |
|
|
DNNDev Admin
 Senior Member Posts:6419

 |
| 19 Jul 2006 05:42 PM |
|
fatgeorge,
RE: required field validation, the user should be able to include a < validate > tag. However, it may not be able to properly determine what control to validate if you have a composite control. Another option is to implement a validation in your control. You could set up a child tag (though you shouldn't use < validate > b/c it will conflict with XMod's processing of those tags) or a property on your control. When creating your child controls, you simply add an ASP.NET validation control of the proper type, configured as necessary to validate your control. FYI, you should also provide some mechanism for users to modify the text of the validation message not only for customization, but also for localization.
HTH, Kelly
|
|
Power Your Website With XMod Pro Buy XMod Pro Today |
|
|
Tony Harrison
 Advanced Member Posts:851

 |
| 21 Jul 2006 02:17 PM |
|
[quote]Posted By fatgeorge on 7/19/2006 4:25 AM [quote]Posted By CrashDome on 7/18/2006 5:05 PM fatgeorge, Is that code working out for you then? I've been using my custom control for two weeks now and have had no issues. I remember you were having issues with the code conflicting (i.e. you needed to use FileInfo). Has this been resolved? Is your commercial control working in medium trust mode? CrashDome[/quote] Well the changes I made are not having any adverse effects, but I didn't have the problem with Medium Trust anyway. Could you try the latest beta for me and let me know your results?[/quote] Hi CrashDome, Just wonderd if you had a chance to try the latest fatgeorge fileupload beta in Medium Trust? |
|
we don't make XMod, we make it better! |
|
|
Ben B
 New Member Posts:53

 |
| 06 Feb 2007 05:53 PM |
|
Hi All, I just found the XMod control and can't say enough about it. I have been running into a few issues with the fileupload control so I made a few modifications. I haven't gotten a chance to test all of combinations, but so far everything seems to be working. I figured that this might be a good post of the community. If you add something or find any issues could you post what you've done. It is interesting to follow the lifecycle of this code. I've uploaded it to the following location: http://www.bahrenburgs.com/DNN/Portals/0/Repository/XFileControl.vb.5f32d9b4-bd71-4077-bcb9-60a9902f3cee.txt Here are some of the new parameters: Parameter Name= ShowDelete Description: Shows/hides delete button Values: "Yes", "No", "True" or "False if no value is given the delete button will not be displayed Parameter Name= DeleteSuccess Description: Delete Success Message Values: Free Text file, if no text is provided the default of "File Removed" is used Parameter Name= RefFile Description: File Name to be deleted Values: This is required to remove the file. It should be the file name only. The upload directory is used to locate the directory information. Parameter Name= MaxFileSize Description: Max File Size To Upload in Bytes Values: This is optional, an error will be displayed if the file larger then the value provided. Parameter Name= UploadTextBoxWidth Description: Sets the textbox width used for the file upload Values: Optional parameter, provide a number Best Regards, Ben |
|
|
|
|
cornelius
 New Member Posts:62

 |
| 21 Aug 2007 07:38 AM |
|
i there, Could someone help me out? I'm using the custom control to perform file uploads with Xmod. It's all working well <custom tagprefix="kbcc" name="FileUpload" ref="FileUpload" cssclass="NormalTextBox" cssclasslink="Normal" style="background-color: white;" extensions="jpg,gif,png" uploaddirectory="blah/blah/" noneselected="true" displaymode="uploadandselect" uploadsuccessmsg="Your image has been uploaded" uploadonce="True"> <label>File Upload</label> </custom> Now, i've got a javascript function that needs to obtain the filename of the uploaded file. I though it would be somehting like this: document.getElementById(XModForm{XMOD_ModuleId}.FileUpload).value However I get a javascript error: Error: document.getElementById(XModForm969.FileUpload) has no properties Source File: .... Any help is appreciated. Cheers, Iwan |
|
|
|
|
selvaganapathy
 New Member Posts:1

 |
| 24 Oct 2008 06:15 AM |
|
how to create a file in dotnetnuke4.0 and how to integrate youtube in dotnetnuke4.0 ! pls if anyone knows help me... |
|
|
|
|