I inhereted this old .net 2.0 site and need to make this code view as an image, like a normal input type = "image" src=".." etc.
<cc1:LocalizedButton ID="btnLogin" runat="server" />
The site is precompiled, so I have no access to the code behind, and I need to keep this forms functionality.
It is VB to if that makes any difference.
Thanks in advance!
UPDATE: Code for first question: https://gist.github.com/1320856
You can use the ImageButton control
Related
I'm looking for some kind of HTML WYSWYG editor solution for an ASP.Net Webforms application. We currently use AjaxToolkit, but it doesn't support pasting images, is not really accessible, etc. I came accross FreeTextBox, but it seems to not support image pasting either, and it's been a big headache to configure properly given that the documentation is not all that descriptive. I've gotten the image gallery to work finally, but it looks pretty terrible, and I'm not sure the images will actually show up in the email (they were broken in my testing environment using the Papercut SMTP emulator). Just wondering if there are any other options I have with a Web Forms app, or am I limited to solutions that are as old as Web Forms?
you can try CKEditor(it have editable tool panel and spell checker)
https://ckeditor.com/cke4/builder
this free js library, easy integrate and if you want send result to .aspx.cs side should use call back by DevExpress control
I still use the ajaxtoolkit HTML editor. It is a bit dated, but I do find without any special settings, that I can paste in in images.
So, say I drop in a text box, use extender, and add HTML editor.
So, say this:
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:TextBox ID="TextBox1" runat="server" Width="1309px"
TextMode="MultiLine" Rows="40" ></asp:TextBox>
<ajaxToolkit:HtmlEditorExtender ID="TextBox1_HtmlEditorExtender" runat="server"
BehaviorID="TextBox1_HtmlEditorExtender"
EnableSanitization="False"
TargetControlID="TextBox1">
</ajaxToolkit:HtmlEditorExtender>
I am able to put a picture in my paste buffer, and a simple ctrl-v does paste the picture:
eg this:
As noted, I think the tool bar etc. does look quite outdated, but my experiance with the toolkit is that ctrl-v to paste in a picture does work.
As suggested, the other possible is ckedit, and it should work with asp.net web pages.
Its not clear why using the ajaxtoolkit editor does not allow cut + paste of images - my experience does seem to work. Perhaps you need sanitation=false?
As noted, the other suggestion here was CKEditor, and that seems like a good choice also.
Our team has a web app built on asp.net (C#) and uses some infragistics asp.net controls. I'm having serious problems (in particular) with the infragistics web dialog window (IGWD) since I started to move the html of the app to html5 and using bootstrap 3 as the css framework.
I believe that some properties like table-layout:fixed and table widths that bootstrap 3 uses are messing up the IGWD control. But if I remove those properties from bootstrap css I mess all the framework and thus, all the app.
Any ideas where I should start? Already read the infragistics documentation but is not as good as one might think and didn't help me at all on this particular issue :-(
Thanks in advance for all your help and patience.
After many attempts I'm starting to get some results - what I did was just follow the guidelines and samples of this guy = http://www.ezineasp.net/post/AJAX-Calendar-Extender-CSS-Theme.aspx and adapt his ideas to infragistics controls.
So, I created my own cssclass and contextualize all infragistics web dialog window classes under my own! But I had to go codebehind to make sure some attributes are set the way I want. For example, I had to add these lines
wdwAddCurso.WindowState = DialogWindowState.Normal;
wdwAddCurso.InitialLocation = DialogWindowPosition.Centered;
otherwise I couldn't get the window to stay where I wanted it even if I had
<ig:WebDialogWindow ID="wdwAddCurso" runat="server" Width="640px" Height="480px" InitialLocation="Centered" Moveable="true" Modal="True" StyleSetName="RubberBlack" ModalBackgroundCssClass="igdw_RubberBlackModalBackground">
<ContentPane FrameBorder="true">
<Template>
<uc1:CursosAdd01 runat="server" ID="CursosAdd011" />
<div class="text-center">
<asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click" CausesValidation="False" CssClass="button" Text="Fechar" />
</div>
</Template>
</ContentPane>
<Header>
<CloseBox Visible="false" />
</Header>
<AutoPostBackFlags WindowStateChange="On" />
</ig:WebDialogWindow>
in the aspx file.
Anyway, thanks for the answer!
The version we're using is Infragistics4.Web.v10.3, Version=10.3.20103.2217.
And the result I'm getting is this (not the final result we desire but...as I've said before, we are getting somewhere):
you can see a screenshot here
Situation: I have been creating webpages in HTML5/CSS3 & Javascript using Sublime 2 text editor for a year, however a college course now requires me to use Asp.Net and Visual Studio 2010. I do not use the designer because I am proficient at doing things by hand, however I find that writing asp: inside every element is time consuming and causes syntax errors when applied to some HTML 5 tags and not others.
Example HTML 5: <button id="btn" type="submit" value="Button"/>
Example Asp.net: <asp:Button ID="Button1" runat="server" Text="Button" />
Question: Can the asp: portion be omitted without effecting anything or is it required for IIS or the C# back-end functionality? What about runat="server" can that be omitted?
Google has come up dry regarding my inquiry, so any help is appreciated.
you simply cannot remove either of the two
but hear me out why, because I have a feeling you are not familiar with ASP and therefor are mistaking the meaning of the asp: and the runat="server" syntax.
first: runat="server"
this property on an element, tells the the compiler that this is actually a server side control
so a <button/> is not the same as an <button runat="server"/>
the first one is pure html, while the second one is a control, which can be bound to on the server side. .Net will give it a clientID (not to be mistaken by the ID you have to give it yourself).
second: asp:
this is a prefix, on certain elements, that tells the compiler these are ASP controls (the default controls given by the ASP.net framework). These include Buttons, TextBoxes, DropDownLists, ...
do not mistake 1 of these with a html element.
an <asp:Button id="myAspButton" runat="server"/>
is not the same as a <button id="myHtmlButton"/>
the first, is a server side control, which can be bound to (see it's runat="server" attribute), and this control renders to the browser as a <input type="submit"/> for example.
you could alter the rendering of the asp.net button class to make it return something entirely differnt if you wish.
and you are also not limited to using asp.net classes.
you can create your own controls, and put them in a custom created library
you could give those your own prefix.
if I created such a custom control, I could register a prefix for it in the web.config file,
and thus I could create a custom button extending from the original one (but with a default label in front...
<myc:CustomButton ID="myButton" Text="myButton" Label="myLabel" runat="server"/>
which could render into:
<label>myLabel</label>
<button ID="*******">myButton</button>
the asterisks are symbolizing the Unique ID it will get from the .net framework
if you want to know more on custom controls, or extending default controls
here is a step by step explanation to create custom controls, or extend from a TextBox control.
it also shows how you add a custom prefix for your controls (in the this case 'cc')
you can find more info here
The runat="server" part is required to tell .NET that it will have to render a button there (which will contain .NET specific ID for processing upon POST). Not too familiar with web forms (I started with MVC), but I would assume that the asp: part is to help distinguish between server controls and standard HTML markup.
Why not try removing it and if it breaks something, then you know it's needed. For instance if the button doesn't show up after removing it, then obviously the .NET markup parser needs it to be there in order to know that it is a place holder for a server control.
The title pretty much precisely asks the question, but I shall repeat;
When I double click on a form control while in the design view in a Web Application project within Visual Studio 2010, say a 'button' or a 'submit' for example, it inserts a javascript function into my .aspx file. When I do this at work it automatically creates an event handler for the control in the code-behind.
How do I change this to that setting? I have used '/resetsettings' already, and other answers to similar questions do not solve my problem. I have reinstalled, gone through every menu I can find (though I may have missed something) and I'm pulling my hair out.
I don't want to type those event handler subroutines every time! Halp meee!
Thanks in advance for any helpful replies.
What it looks like is going on with this is that you are double clicking on a regular HTML element. For example, if you have
<input type="button" value="Test" id="Test" name="Test" />
and double click on it in design view it will create a JavaScript function on the page for it and an onclick event in the element. If you want to create an event handler in the code behind, you need to have an Asp.Net control like
<asp:Button runat="server" ID="Test" Text="Test" />
and then double click that to create a code event in the code behind.
Also, make sure that your page directive at the top has the correct filename for its CodeFile attribute to correctly map to an existing code behind file.
im creating a umbraco plugin, which uses an asp:LinkButton. which looks something like this
<asp:LinkButton ID="ObjectInformationBtn" class="link" runat="server" Text="View Full Details of Item" OnClick="ObjectInformationBtn_Click"></asp:LinkButton>
when I test this plugin locally I get the following result
View Full Details of Item
however when I put the plugin on the website I get a complete different results, which looks like this
<p> </p>
can someone please tell me what is going on.
Are you sure the ascx containing the linkbutton is published to the production website in the usercontrols folder?
Do you have a Macro created that references the User Control that contains the LinkButton?