I have implemented bootstrap design in my asp.net application with ajaxcontrol toolkit v17.0.
I need to implement AjaxFileUpload, but it not showing properly on my page and even when I click on it, it not responding anything, file selection popup not open, and even no browser console error is there.
<div class="col-md-4">
<ajaxToolkit:AjaxFileUpload ID="fuSpecialReportFiles" runat="server" AllowedFileTypes="png, jpg, jpeg, bmp" OnUploadComplete="fuSpecialReportFile_UploadComplete" />
Related
I am developing a site in which youtube video’s will be added to asp.net page using the HTML code given at youtube.com site. When I run the program, in the web page youtube video is displayed. But the strange thing is when I move mouse over the video display area the page postbacks happens. I am able to find this when I run the program in debug mode.
To exactly reproduce the scenario, I am writing the steps which I have done in my project.
1) In visula studio 2010 > Open asp.net web application project (with c# as language)
2) add some page, say cat.aspx
3) in cat.aspx write the code as below
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="lblVideo" runat="server"></asp:Label>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
4) in cat.aspx.cs, in page_load even write the following line
lblVideo.Text = "<iframe width=\"620\" height=\"349\" src=\"http://www.youtube.com/embed/WoTsE7pbuKg\" frameborder=\"0\" allowfullscreen></iframe>";
5)you can replace the above given by youtube.com, but be sure to set "http:" and escape " with \" as how I have done.(to get HTML code for any youtube video, visit www.youtube.com, click on any video or a famous song, below the video a menu "share" will be displayed, click on it, then another option "Embed" will be displayed, click on it, you will be presented with code)
6)Now run your web app project, you can see, youtube video is displayed.
7)Now run with break point set in Page_load event, now move mouse over the video display area, you can see for each time the mouse enters the video display area, a postback happens.
8) I have latest flash installed in firefox and InternetExplorer, this problem happens only in firefox and IE, not in chrome. And this problem happens only when we use Updatepanel. I also found that page does not postback (IsPostBack) is false when every time the control hits the codebehind. It is like page is requested for the first time as how we type the url in the address bar and press enter
I tried using asp:PostBackTrigger and asp:AsyncPostBackTrigger
Both are not giving solution to the problem, because what happens is not postback, it is fresh page request
Many Thanks in advance to anybody who try to help or give solution.
In Web application, asp.net web application I am using one link button/Image button of asp.net server control, when I click on that control it is loging out from the site. What could be the reason can you help me please.
The code is like this :
<img src="Images/aaa.png" width="24px" height="24px"/>
<asp:LinkButton ID="lnkhlpbtn" runat="server" PostBackUrl="../ss/ssn.aspx"
class="blue1_link"></asp:LinkButton>
(Posting my suggestion as an answer for sweet, sweet karma):
Also, why are you using <asp:LinkButton>? Why not a straightforward <a href="#">?
I have a Jquerymobile popup(in asp.net website) and within that I have a simple textarea and submit button.
After the submit button event, I want to do certain things.
Validation on textarea, if empty show a literal with error message.
If successful, then show a thank you message along with close button.
All this has to be done while the popup is open (after submit).
The problem is, after submit the DOM is refreshed and popup box is closed.
<div class="feedback-text">
Feedback
</div>
<div data-role="popup" id="feedback" data-overlay-theme="a" data-position-to="window">
Close
<div class="feedback-field-wrapper">
<asp:TextBox ID="txtFeedback" runat="server" Text="*feedback" cssclass="form-first-name" TextMode="MultiLine" Rows="3"></asp:TextBox>
</div>
<center>
<div class="errormsg-feedback"><asp:literal ID="ltError" runat="server" Text="test" Visible="false"></asp:literal></div>
<asp:Button ID="btnFeedback" runat="server" Text="Submit" data-ajax="false"
data-icon="arrow-r" style="width:150px;" data-inline="true" /></center>
</div>
Would you guys suggest if there is a way to keep the popup box open after the submit.
Thanks.
Unfortunately, you cant do that normally unleass otherwise you use localStorage API. This is like a cache system which exists in the browser. From DiveIntoHTML5
So what is HTML5 Storage? Simply put, it’s a way for web pages to store named key/value pairs locally, within the client web browser. Like cookies, this data persists even after you navigate away from the web site, close your browser tab, exit your browser, or what have you.
You could set a value in localStorage in the submit event of #btnFeedback, then on page refresh, check if that value exists on page refresh and reopen it.
To set a value :
localStorage["isOpen"] = "1";
To check if its null or not :
var isOpen = localStorage["isOpen"];
if ([null, undefined].indexOf(isOpen) == -1) {
//data exists
}
Demo : http://jsfiddle.net/hungerpain/ZJvjJ/
An alternate, better method would be to use ajax to submit your form. This way the page wont refresh and gives the user a nice experience.
Here's a question which helps you do that : jQuery AJAX submit form
Hi i am using Report service client definition (rdlc) for reporting in my asp.net web application.
I used a reportviwer for displaying report. But while clicking on the print button of report viwer the following error occures
Here is my aspx portion
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<rsweb:ReportViewer ID="ReportViewer1" runat="server" Visible ="false" Width="100%" Height="100%" ShowPrintButton="true">
</rsweb:ReportViewer>
</div>
If anybody knows please help me
The print button of SSRS report viewer is an ActiveX control.
This works only on IE. If you are using any other browser you will not be able to load this control. This ActiveX control is known to cause problems with IE 9 too.
So unless you stuck to a really old environment of IE7,IE8. Don't bother to use the print control that comes with reportviewer.
Provide a button to export the same report as PDF, and let your users print from there.
Where we've seen this problem, it's been because users haven't had permissions to install the ActiveX control into IE.
There's two suggested solutions here, one of which is to deploy the ActiveX control manually onto each machine where it's needed.
I have a ASP.net which allows users to select a number of inputs and dropdown lists to filter the report and to download an Excel report after pressing a button on that same form.
The page can be used mulitple times, by changing the inputs and pressing the download
button each time.
The button should be posting back to the hidden IFRAME to a separate webpage, but I am
unable to change the target for the form on the fly as needed.
<form runat="server" method="post">
<asp:Button runat="server" id="DownloadToExcel" TabIndex="-1" Text="Download To Excel" UseSubmitBehavior="False" PostBackUrl="report.aspx" />
</form>
<iframe style="hide" id="output" src=""></iframe>
Additonally, when I download the file when pressing the "DownloadToExcel" button, the file downlodads as expected. However, any additional postbacks including updating the screen are posting back to report.aspx and not filter.aspx.
How do I correct the postback so it only postbacks once to download the file, and then change it back to the original page so the screen can continue to be used to filter and download a second report.
This may also eliminate the need of the IFRAME as well.
I solve the problem my adding PostBackURLs to all the submit buttons directly.
One for the Excel download that goes to report.aspx and the other for the postback on the page for filter.aspx.
It appears that if the postback is changed, in this case to report.aspx, it reuses the pathname for any subsequent postbacks, unless defined explicity, for each time you wish to postback.