C# ASP referencing input data into a .cs file (input class vs. asp:TextBox) - input

I am using a bootstrap template login form but having trouble using the data entered into the textbox to be used in the "code behind" file using the id. If I use the same approach using an asp textbox, there is no problem. The ID is being used to take input from the .aspx page and apply it to make query calls to a database in the corresponding .cs page.
ASP TextBox:
<asp:TextBox ID="LOGIN" runat="server"></asp:TextBox>
ID="LOGIN" can be used in the .cs file but the input textbox is basic, not styled.
Bootstrap Textbox:
id="login_email" cannot be used in the .cs file> styled nicely but cannot use input for the .cs file.

Related

Orders of .cshtml and .cs file in Asp.net Razor Pages changed, what to do?

The orders of my .cshtml and .cs file in the solution explorer of visual studio have been changed. Previously there were first a .cshtml file and an arrow before it which when I clicked on it, the expended .cs file appeared in the next level. But now this order has been changed and the arrow is before .cs file and not allow expansion and those files are in one level (not two, as they were before). See it in the following picture:
Check if File Nesting option is enabled in solution explorer

SharePoint 2010 rich text field showing html tags in list views

I have a custom list made up of out of the box SharePoint field types (no custom field types used), but I am using custom new/edit/display form on the list which I have created using application pages.
We want the users of the forms to be able to put rich text formatting on these fields, so I am using the following tags for this....
<SharePoint:InputFormTextBox ID="rteChangeDesc" RichText="true" RichTextMode="FullHtml" runat="server" TextMode="MultiLine" Rows="10" Width="99%" Columns="500"></SharePoint:InputFormTextBox>
This works great on the forms but the list views all show the html tags. I've tried various ways of removing these, including setting the disable-output-escaping="yes" in SharePoint designer, and this hasn't worked.
Currently, I am saving the fields to the list in the code-behind using Server.HtmlEncode(), then using the HTMLDecode to display the contents correctly.
Is there a way of easily removing HTML tags in the view column, without loosing the rich text functionality and tool bar in the forms?
Or can I do something in the code-behind code before saving these to the list that would make them display in view columns but keep the formatting in the form?
Any help appreciated! Thanks!
Go to List Settings and modify the individual columns to show only rich text and not enhanced rich text. It worked for me. I can still include links and pictures and other HTML items but you do not see the code behind it.

ZF2 - How to Save Uploaded File when Form is not Valid on Submit

I have a form in ZF2 where, for example, a text box and a file input box are included. What about when the form is not valid because the text box, for example, is required and user leave it blank, how can I save on the form the previously uploaded file so that it will not be uploaded again and again when the form is invalid?
Regards,
Eli
As of ZF2.1 (I think), there is support for this via the post-redirect-get plugin. The relevant documentation is here:
http://zf2.readthedocs.org/en/latest/modules/zend.form.file-upload.html#file-post-redirect-get-plugin
When you cannot separate the forms, the File Post-Redirect-Get
Controller Plugin can be used to manage the file inputs and save off
valid uploads until the entire form is valid.
You could use Validation groups to validate the none-file fields separately from the file input fields:
http://framework.zend.com/manual/2.0/en/modules/zend.form.quick-start.html#validation-groups

Submitting a PDF file and saving in ColdFusion

I need users to be able to fill out a form in a PDF file using their browser then, when they click the submit button in the PDF file's form, a new PDF file is saved with the contents they entered in the form.
One of the main examples I have been referencing is Adobe's help section on this subject, but have had no luck: http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec11c2b-7ffa.html
The PDF file I was provided didn't have a submit action associated with it. So, I opened up LiveCycle designer and found the submit button and added this code to it:
<submit format="pdf" target="http://localhost:8500/pdfforms/pdfreceiver.cfm" textEncoding="UTF-16" xdpContent="pdf datasets xfdf"/>
Changing the target to the correct location on my local server, of course. Then, when I use this portion of code:
<cfpdfform source="#PDF.content#" action="read" result="fields"/>
<cfdump var="#fields#">
I get an error saying:
Element CONTENT is undefined in PDF.
I also tried opening it up in Adobe Acrobat X Pro and setting the action to submit the entire PDF file, but that didn't work either. I'm using ColdFusion 9 on Windows 7 if that helps any. Thanks in advance for your help!
You don't use CFPDFFORM to read the results from submitting a PDF. The PDF form should do a FORM POST to the target page, just like an html web form.
You can see the results of the form by doing a CFDUMP on the FORM scope:
<cfdump var="#form#">
Then you use a variety of methods to parse through and store that information in a database.

Sharepoint 2010 : Using infopath form content type on a document set

Here is the situation :
- Created a web-enabled form using InfoPath and published it to the Sharepoint site as a content type named PAF Cost , uploaded the model form as well in a library on the site.
- Created a document set named PAF, which containes the PAF Cost splitting content type.
- Created a library Forms in which i allowed the document set PAF content type
When I create a new document set say PAF1, i go inside it and i go to the ribbon document/new document command and i can create one new PAF Cost frame. I can edit this form through the web interface which is correct.
Now i want this form to be automatically created when i create a new document set PAF1,
To do this i specified a template for the default content type in the document set PAF settings, and i give the .XNS form file as a template. The form gets automatically created in the document set, but when i click on it it launches Infopath, and does not open as a web form. The icon as well is different from the manual y created form which open as a web form.
How can i make this automatically created form to open as a web form ?
I haven't found a way to make it work with a .xns as template. But if you specify the .xml (just creat an empty form in the library, it's an -xml with the .xns as reference) as the template within the documentset it works fine.
(Same goes for infopath documents created from code - I hade to use the .xml as template, to have it open in thw browser by default.)