|
Thanks For Your Reply.
Actually, First of all I want to record the audio and Save into Client box using browser.Once I recorded the audio file then Upload into Server folder.
Thanks,
Bruze
modified on Monday, September 21, 2009 5:29 PM
|
|
|
|
|
Yes. Say you upload a file into the server
say abc.wav
save this file into a directory which is within the virtual path. say c:\mywebsite\xyz folder.
so that you can call
http://yourserver.com/xyz/abc.wav
Now create your webpage such that it plays audio using this path.. not your original physical path.
Finally take any of the different steps mentioned here to play your sound in the browser:
http://www.phon.ucl.ac.uk/home/mark/audio/play.htm[^]
Hope you understand this.
|
|
|
|
|
I got it. Thank you So much for your reply
|
|
|
|
|
hi
through this code i am recording audios and listening locally but I am unable to record audios on online(production server).its showing empty file.recording not happening there.
Please suggest me
my code as follows
protected void btnSaveStop_Click(object sender, EventArgs e)
{
shortPath = Server.MapPath("~/Audios/" + txtTag.Text + ".wav");
formatShortPath = string.Format("save recsound \"{0}\"", shortPath);
mciSendString(string.Format("{0}", formatShortPath), null, 0, 0);
mciSendString("save recsound ", "", 0, 0);
mciSendString("close recsound ", "", 0, 0);
Computer c = new Computer(); c.Audio.Stop();
}modified on Friday, March 12, 2010 1:08 AM
|
|
|
|
|
I found that in my webpage, once the alert messagebox (as follows) is shown then some control styles (such as, location, font size and so on)
are changed in a unexpected way. what is the reason then? anyone suffered this problem before?
Response.Write("<script>alert(sth is here!')</script>");
|
|
|
|
|
I think this is not good practice to write the response. Rather use
this.ClientScript.RegisterStartupScript(this.GetType(), "myscript", "alert('sth is here!')", true);
RegisterStartupScript is there to write javascript output to the client, so why use Response.Write.
|
|
|
|
|
Hi,
The situation is this:
I would like to have an static method in some class of the Models library like this
static User GetCurrentUser()
Which takes a cookie in the user ("currentUserId") and returns the User retrieved from the db..
The problem: I cant have access to the cookies (to the "Request" class) from the Model lib.
So what other solution can I use?
Should I make that method in the Controllers library? IF i dont add a view to a method of a controller class then that method wont be an action?
ALSO: The method needs to be used from other controllers.. so.. is that possible?
|
|
|
|
|
Why dont you use Static Property...
HttpContext.Current.Request.Cookies
This will do the trick...
|
|
|
|
|
As a basic tenet of the MVC pattern the model should not need to know about such things.
only two letters away from being an asset
|
|
|
|
|
Separation of concerns is a reason to use the MVC pattern. By trying to use the Request object in your model you are violating the tenets of MVC.
There is not a one-to-one correlation between views and actions. You can have an action that redirects to another view or renders another view.
Create a BL class that has the GetCurrentUser method and call it from the controllers as necessary.
only two letters away from being an asset
|
|
|
|
|
I have a page with ultrawebgrid. in the first cell of the grid has a hyperlink. when you press the hyperlink opens a new page but when it loads stays back and shows the first one.
I want to focus on the second page.
please help.
|
|
|
|
|
Add this code to the second page:
<script type="text/javascript">
function setFocus()
{
document.getElementById('yourcontrolid').focus();
}
</script>
Now in the second page
<body onload="javascript:setFocus();">
Thus the focus will be set when body is fully loaded...
|
|
|
|
|
But I was little bit confused because he was asking for Focus on Page.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
This is the most weird thing ... If he ever thought of this, its impossible(AFAIK). How can one have focus on a blank page which is not even
document.body.contentEditable='true';
document.designMode='on';
focus moves from control to control based on the Tabindex specified, and after it finishes all form elements it goes to addressbar etc...
|
|
|
|
|
Hi all,
Im using asp bulleted list control with ajax paging extender. I want to display the bullets flow in horizontal direction. can any one help me.
it displays like .asaa
.sadsa
.asasa
Please help me.
|
|
|
|
|
You can use CSS to control the elements on your page.
only two letters away from being an asset
|
|
|
|
|
anu_anu wrote: it displays like .asaa
.sadsa
.asasa
Means U want To Display It
.asaa .sadsa .asasa
or the Format U asked
I am Bit Confused
http://www.asp.net/LEARN/ajax-videos/video-145.aspx[^]
I think the above is Not Ur Answer Right..!
If It Helps Click It as Answer
|
|
|
|
|
You need to display horizontal..
use
display:inline
For Example :
<style>
.bulletstyle
{
padding-left:10px;
}
.bulletstyle li
{
display:inline;
}
<style>
<asp:BulletedList runat="server" ID="blt" CssClass="at-red">
<asp:ListItem>Item1</asp:ListItem>
<asp:ListItem>Iten2</asp:ListItem>
<asp:ListItem>Item3</asp:ListItem>
</asp:BulletedList>
The output will be <br />
Item1 Item2 Item3
|
|
|
|
|
and 7 hours later...
only two letters away from being an asset
|
|
|
|
|
Use css considering <UL> and <LI> elements because the bulletedlist is rendered using <UL> and <LI> elements.
|
|
|
|
|
I am executing a oracle stored procedure from the asp.net2.0 application and its takes long time to complete the execution.At that time the page is timing out if the execution takes more than 1 hour..
The Error "Page cannot be displayed". no error code is displayed.There is no entry in event log viewer also.
when i debug the application it doesnt break when the Error occured and in the backend sp is completing the execution but doesnt return any value to the page.
I have set session Timeout = 300 and httpRuntime tag executionTimeout="18000" maxRequestLength="1048576" in web.config.
I am using oracle.dataaccess.client for oracle connection.
Please help me to retain the page when the stored procedure execution takes more than 1 hour to complete.
prasannavenkatesh
|
|
|
|
|
|
I have placed a break point and checked. There is no problem with connection.
we are handling with huge data with more than 25000 records. The functionality is the records are moved from temp table to other tables and the records are deleted in the temp table.
If it is very less data and which will complte the execution within 1 hour then it is working fine.
I have increased commandtimeout also into 18000 secs after connection established.
The guy who is handling oracle sp is unable to reduce the execution time currently.
So i am trying to fix the issue from the application.
Please help me to solve this issue.
prasannavenkatesh
|
|
|
|
|
Is the code all in the code-behind for the page? If not, test each piece (i.e. Unit Test) to verify each piece is functioning properly. That will help you to identify a problematic component and give performance data.
prasannavenkatesh wrote: Please help me to retain the page when the stored procedure execution takes more than 1 hour to complete.
It is a really bad design and architecture to keep a page open this long.
only two letters away from being an asset
|
|
|
|
|
I have login page and a main page in the asp.net 2.0 application.In web.config, session Timeout value is set as 5 mins.
My requirements are as below
1.If the main page is idle for 5 mins, the session will expire and the same page will be retained. If the user tries to do some action then it has to redirect to loginpage.
bebuggiung steps
1.comes to session end event in global.asax and the retain the main
page
2.comes to session start event in global.asax after the user tries to
do some action.
3.check the condition and redirects to login page
2.If the session ends at the time of some action is going in the main page(eg executing a stored procedure for a long time ) then the session has to continue upto the action gets finished.Once it is completed session timeout value has to reset as original value (5 mins)
bebuggiung steps
1. Comes to session end event and assigns the session timeout value
to retain the running process in the main page.
I have used the following code to do the above requirements.It is working fine in IIS V5.1 (win xp) and not working in IIs 6.0 in win 2003 server
Web.config
sessionState timeout="5" mode ="InProc" cookieless ="false"
Global.asax
void Application_Start(object sender, EventArgs e)
{
// Code that runs on application startup
Application["Button"] = "Started";
}
void Session_Start(object sender, EventArgs e)
{
// Code that runs when a new session is started
HttpContext context = HttpContext.Current;
HttpCookieCollection cookies = context.Request.Cookies;
if (cookies["starttime"] == null)
{
HttpCookie cookie = new HttpCookie("starttime", DateTime.Now.ToString());
cookie.Path = "/";
context.Response.Cookies.Add(cookie);
cookie.HttpOnly = true;
Application["Button"] = "Started";
}
else
{
if (Application["Button"] == "NotClicked" || Application["Button"] == "Error")
{
context.Response.Redirect("~/Logon.aspx");
}
}
}
void Session_End(object sender, EventArgs e)
{
if (Application["Button"] == "Clicked")
{
Session.Timeout = 60;
}
else
{
Application["Button"] = "NotClicked";
}
}
}
Main Page Load
Application["Button"] = "NotClicked";
Main Page Button Click (calling sp in this button)
Application["Button"] = "Clicked";
Please any one help me out to do the same in IIS 6.0. I have tried with worker process idle time also in application pool.
What is the difference in IIS 6.0 with IIS 5.1 using the above code with cookies? Please any one reply me as soon as possible. its very urgent....
|
|
|
|