protected void Button1_Click1(object sender, EventArgs e)
{
int index = ((GridViewRow)((Button)sender).NamingContainer).RowIndex; string str = this.gvRoom_01.Rows[index].Cells[0].Text.ToString(); try
{
SpeechVoiceSpeakFlags SpFlags = SpeechVoiceSpeakFlags.SVSFlagsAsync;
SpVoice Voice = new SpVoice();
Voice.Speak(str, SpFlags);
}
catch (Exception er)
{
//MessageBox.Show("An Error Occured!", "SpeechApp", MessageBoxButtons.OK, MessageBoxIcon.Error);
} }asp.net写了个发音代码,在本机上单击按钮可以发音,但发布到服务器后,别的机访问单击按钮就没声音了,高手知道是什么问题吗?谢谢
{
int index = ((GridViewRow)((Button)sender).NamingContainer).RowIndex; string str = this.gvRoom_01.Rows[index].Cells[0].Text.ToString(); try
{
SpeechVoiceSpeakFlags SpFlags = SpeechVoiceSpeakFlags.SVSFlagsAsync;
SpVoice Voice = new SpVoice();
Voice.Speak(str, SpFlags);
}
catch (Exception er)
{
//MessageBox.Show("An Error Occured!", "SpeechApp", MessageBoxButtons.OK, MessageBoxIcon.Error);
} }asp.net写了个发音代码,在本机上单击按钮可以发音,但发布到服务器后,别的机访问单击按钮就没声音了,高手知道是什么问题吗?谢谢
解决方案 »
- CSDN网站首页是静态的还是动态的?
- 请问cs文件名一定要和类名相同吗?请看这个特例
- GridView如果没记录能显示表头表尾吗
- |M| 我们知道样式A有a:hover {} 也就是鼠标移到时的CSS 现在我想给button 也加这个功能要如何实现
- ShowModaldialog显示页面如何在页面标题不显示"网页对话框",在线等,急急!!
- 如何通过连接调用Media Player
- <求教> 调试过程中的应用程序中的服务器错误,请问如何解决...
- 请问如何ASP.NET C# 中,如何手工结束一个进程?
- 如何限制FILE FIELD打开文件的类型
- DropDownList 问题:用户能否输入?
- 错误。 提交时 HTTP 404
- datalist 排版问题
voice.Voice = voice.GetVoices(string.Empty, string.Empty).Item(0); //其中3为中文,024为英文
voice.Speak(richTextBox1.Text, SpeechVoiceSpeakFlags.SVSFDefault);
这个可以读了,
<head>
<bgsound id="bgs" src="" loop="1" />
<script language="javascript">
function showSound()
{
// 找一个mid放在你的网站下
document.getElementById("bgs").src = "http://localhost/click.mid";
}
</script>
</head>
<body>
<input type=button value="testSound" onclick="showSound()">
</body>
string str = this.GridView_01.Rows[index].Cells[0].Text.ToString(); 这样写只能在服务器读出来
SpeechVoiceSpeakFlags SpFlags = SpeechVoiceSpeakFlags.SVSFlagsAsync;
SpVoice Voice = new SpVoice();
Voice.Speak(str, SpFlags);