Controls :: Dynamically Set MP3 FileName To DewPlayer From Server Side
Mar 17, 2014The control works fine with hard coded file name.
However, I need to pass on an mp3 filename dynamically with code.
How can I do that? I use vb.net ...
The control works fine with hard coded file name.
However, I need to pass on an mp3 filename dynamically with code.
How can I do that? I use vb.net ...
Is it possible to use AJAX and an update panel and create server-side controls such as checkboxes, buttons, and radio buttons (asp server side) that is created when another server-side control (that which exists outside the update panel) calls them?
secondly, how do you keep them from re-appearing after a postback?
When I do a postback, the controls in the update panel disappear.
Is there a way to add asp.net server side control dynamically on the webpage without causing postback. Like can I add a calender control dynamically on a button click and handle calender events to do some other work....
View 1 RepliesHow to Dynamicly generate HTML from server side ?
I'll give you some examples..
Now im using Response.Write("<a> hi hi </a>"); something like this and i generating stuff dynamicly depends on what is on the SQL..
I was wondering how facebook does it or all those sites is generating a full page depending on the SQL...
I have a page with a table and two button with the names (Submit and Add Rows) When I click on Add Row a new row will be added to a page(This is achieved using javascript), when I click on submit button I will be doing server side validation. If I found any error the error will be displayed on the page. During this process the controls which were added by me were loosing its state. As a result I need to add the rows once again and need to fill the data and click on submit button. Can any one let me know how to avoid this and see that the controls donot loose their states. So that there is no need for me to create rows once again if any validation fails on the server side.
View 1 RepliesI am working on ASP.NET3.5 platform. I have used a file upload control and a asp button to upload a file. Whenever i try to upload a file which contain special characterlike (file#&%.txt) it show crash and give the messeage "Server Error in 'myapplication' Application." A potentially dangerous Request.Files value was detected from the client (filename="...New Text &#.txt"). Description: Request Validation has detected a potentially dangerous client input value, and processing of the request has been aborted. This value may indicate an attempt to compromise the security of your application, such as a cross-site scripting attack. You can disable request validation by setting validateRequest=false in the Page directive or in the configuration section. However, it is strongly recommended that your application explicitly check all inputs in this case.
Exception Details: System.Web.HttpRequestValidationException: A potentially dangerous Request.Files value was detected from the client (filename="...New Text &#.txt"). Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. how can i prevent this crash using javascript at client side?
I'm trying to add dynamic content to my page from external files, but coming short on how to do it properly. First i tried fiddling with the WebClient class, but when i added the dynamic content it just posted the code behind.. Actually the same as Response.WriteFile does
It's for a simple CMS where i have the basic site core and then some extra modules that i have lying in a seperate folder. If the parsing of the requested url demands a modulefile, the idea was to search for that file and if it existed, run the code and post it back to the site core.
In classic i was forced to manually (ugh..) add includes with the filenames statically written in the file-property.. That could be the way to do it again, but is there another way? Something like server.execute in classic, i just need to be able to send site core variables to the external file (without sessions if possible)
The scenario is this. I have a long page that has a scroll bar. I'm us an Ajax ModalPopupExtender and that too is very long and has a scroll bar.
The problem I'm seeing is that in IE when a user scrolls the modal popup window, when it reaches the bottom it also scrolls to main window which has a really ugly user experience.
So what I want to do is, through server side code, I want to dynamically change the body css overflow from auto to hidden and I can't seem to find a way to make that happen. I've tried a number of approaches and none of them seem to work.
<body style="overflow:hidden;">
I have created a javascript function along with the scripts in a class file using string builder as follows
public static string ShowAlertMessage(string pHeader, string pError)
{
StringBuilder strScript = new StringBuilder();
strScript.Append("<script type="text/javascript" src="").Append("Scripts/jquery-1.4.1.js").Append(""></script>");
strScript.Append("<script type="text/javascript" src="").Append("Scripts/jquery.msgBox.js").Append(""></script>");
[code]...
This method I am calling on each and every page on the button click where ever I required as follows
ClientScript.RegisterStartupScript(this.GetType(), "Popup", Alert.ShowAlertMessage("Hello", "Welcome"), true);
But this is not giving me the output I needed, the one which I converted is the following URL....
I am trying to allow for multiple selection check boxes that are created dynamically.
The Following code is written for each row in the dataTable (I print it as HTML code)
<input type='checkbox' name='multiCheck' id='chk{1}' value='{1}' runat='server'/>
however, on the server side (after postback) I can't read them from the Request Object. How do I "mark" them so I can read them at the postback?
protected void DeleteSelection_Click(object sender, ImageClickEventArgs e)
{
int multiIdsToDelete = Request.Form["multiCheck"]; <-- In the Future will be added to an array so I can do the delete for each row selected.
}
I have a list of items on an ASP.net page. That list is selectable in that whenever the user clicks on one, the page does a postback and the server code stores the index or some unique identifier of the picture in a ViewState property indicating that it is currently selected.
I would like to minimize the load on the server and therefore I would like to store the index or unique identifier representing the image in some way on the client side. The best way I can think to do this is to store said information in a hidden field ), however I had two questions about this before I go crazy:
Is this a security risk in any way, shape or form (i.e., exposing implementation details of the page)?
Is there a better/best way to do this that is more industry-standard? Does ASP.net provide a framework to do this that is cleaner than my idea? Seems like this would be a fairly common requirement to me...
i have a grid asÂ
<asp:GridView ID="dgv_passengerdetails" runat="server" AutoGenerateColumns="False"
CssClass="pasdetailsgrid" BorderStyle="None">
<Columns>
<asp:BoundField HeaderText="Seat No" DataField="seatno">
<ItemStyle HorizontalAlign="Center" />
</asp:BoundField>
[code]...
the string gs=null, if i click the button again then gs takes the value from textbox.
I have a problem with my code. My code is using the fileupload control to browse for a filename when you add a filename it processes it and the code runs fine on when it lives on local host, but when I put the code on our prodution server it cannot find the filenames listed by user.
For example if I use the upload control to browse to B:MISCH IntiveRPTTOFL_3.csv and the code lives on my localhost which know what that file path means it works, but if the code is moved to a production server it may or maynot know what B:/ is or B:/ maybe mapped to something else. Even if I am browsing to a file on my C drive it will work on if the code is on the machine that the C drive is on, but it will not work if the code is on another machine because obviously that file wouldnt be on that C drive.
Private Function CSV2DataTable(ByVal filename As String) As DataTable
Using MyReader As New _
Microsoft.VisualBasic.FileIO.TextFieldParser(filename)
MyReader.TextFieldType = FileIO.FieldType.Delimited
What can I do in asp.net to make the filename work correctly?
Ok lets say I get the filename and save it as so
FileUploadControl.SaveAs(Server.MapPath("~/") + filename);
now I want to pass the filename to the function above for processing. Do I pass Server.MapPath("~/") + filename as the filename? Also when I am done what do I do to delete the file from the server?
HOWTO create ASP.NET C# controls on server side for posted data that had no runat=server on the client.
I have processes needing to post files to a ASP.NET application. These processes must post without runat=server as such:
<form ~~~~ to some ASP.NET/C#/aspx page>
<input type=file name=MY_FILE ~~~>
</form>
On the ASP.NET page, in the Page_Load I would code somethign like this:
[URL]
Here is the trick, the control "fileLIST_FILE" does not exist because the HTML does not have runat=server on it.
If the client did have runat=server the designer.cs would have somethign liek this:
System.Web.UI.HtmlControls.HtmlInputFile fileLIST_FILE;
With all that said, I want to make "fileLIST_FILE" on the fly inside Page_Load fromt he posted name of "MY_FILE".
do not focus on the fact that this is a file upload. I would like to know how to do this for any posted FORM data.
I Getting A Problem In DataGrid's ItemDataBound Event. I Am Calling A JavaScript Function In DataGrid's ItemDataBound Which Retrun The CellIndex And RowIndex Number On Which UserClick After That I Am Re-Binding The DataGrid With jQuery Function After That ItemDataBound Event Not Working. I Want To Call The Same Function Again. Is Their Any Method To Call A Server-Side Function On ItemDataBound Event Except Client-Side Function..
View 4 RepliesThe code for the asp.net page is:
<div class="facebox_content">
<% if (CurrentUser.Role == "Free")
{
%>
<table cellpadding="0" cellspacing="0" style="border-collapse:collapse;width:380px;">
<tr>
<td>
User Name :
</td>
<td>
Membership Cost :
</td>
</tr>
<tr>
<td style="width:190px;">
<asp:TextBox ID="txtUserName" Enabled="false" runat="server" Text="<%= CurrentUser.Name %>"/>
</td>
<td style="width:190px;">
<asp:TextBox ID="txtCost" Enabled="false" runat="server" Text="2000"/>
</td>.........
If I have a standard HTML textbox
[Code]....
but got a readonly error.
I have a requirement of adding server side variables in client side and other way round. Because I need to set a value from client side using javascript and access the same in code behind page.
I have to use C#.Net and JavaScript.
Suppose I'm building a StackOverflow clone using webforms ASP.NET and jQuery. The Question page has a question, several answers, and comments under each. Requirements:Users can post new answers and comments, and edit existing ones, without postbacks. No UpdatePanels; the AJAX calls retrieve just the JSON they need, not HTML fragments. The page loads with all existing answers and comments in place (no javascript needs to run to read the page).
What I'm trying to figure out is how to do this without having to maintain two sets of markup (one that's bound on the client using some form of jQuery templating, and one that's bound on the server using traditional WebForms).
I reordered some items in a listbox using Javascript. When I read the items in a postback in the code behind (ASP.NET), the order is in the original order. How do I get the same order as shown in the screen after Javascript manipulation?
View 3 RepliesI m using site login Control in my login.ascx file and disaplaying login control in Div so if there is login link in page and i click on that then Login Div will popup which is site login.May i know how can handle error like username or password is incorrect on client side instead server side?
View 6 RepliesI have to implement the print functionality on aspx page like on click of print image icon user will be able to get the print out of aspx page .aspx page will contain the server controls like textboxes , Gridview etc which one approach will be the best server side or client side printing ?
View 4 RepliesI am trying to set a hidden type value to x on Server Side and then access it with Javascript. I have tried multiple ways to accomplish this.
At the basic level this is what I am trying to do.
Aspx page
<asp:HiddenField ID="HidRowNumber" runat="server" />
CS Page
In IsPostBack
HidRowNumber.Value = EFileRowNumber.Text;
Javscript
var status = document.getElementById("<%= HidRowNumber.ClientID %>").value;
When I am debugin it say it HidRowNumber's Value has changed to x but when I access the value with JS it always returns ''.
i can use escape() and unescape() functions by Client side easily, but the problem when i have use escape() method for peice of HTML , then i dont know how to unescape this piece of HTMl By Server Side not By Client Side. how i can unescape (escapped HTML) by server side?
View 2 RepliesI have a hidden variable and its value is being updated using javascript(client side) which I make a call from server side code. After making the call I am not able to retrieve the updated value from Server side variable. I went through this forum [URL] but not able find a way how to implement functionality with IFRAME. I am trying to call the client side code and retrieve the updated value from server side in page_load event.
View 5 Replies