|
Sir, I can play the whole game before it starts.
100
Help people,so poeple can help you.
|
|
|
|
|
hello guys.. I have a gridview in which I show wave file paths and a button control to Play them. Now everything is fine like im getting records (using RowCommand function of GridView) and showing paths. But I am unable to play the sound. I am using <object> tag embedded in ASP.NET using Literal control. Here is what I am doing.
<script runat="server">
void OnRowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName.Equals("Play Now"))
{
int index = Convert.ToInt32(e.CommandArgument);
GridViewRow row = gridCalls.Rows[index];
txt1.Text = row.Cells[5].Text;
this.myLiteral.Text = "<html><body><object>";
this.myLiteral.Text += "<param name='autostart' value='true'>";
this.myLiteral.Text += "<param name='src' value='Likh Raha.mp3'>";
this.myLiteral.Text += "<param name='autoplay' value='true'>";
this.myLiteral.Text += "<param name='controller' value='true'>";
this.myLiteral.Text += "<embed src='Likh Raha.mp3' controller='true' autoplay='true' autostart='True' type='audio/wav' />";
this.myLiteral.Text += "</object></body></html>";
}
}
</script>
|
|
|
|
|
Get rid of the html and body tags for starters. You are already in your HTML. Secondly, is the path to your mp3 correct?
|
|
|
|
|
Does anyone know if there's a tool which i can download and use for decoding base64 encoded files? It should work just like in http://www.base64converter.com
I have a windows .net application for downloading encoded data from a web service and i need to manually decode that data using above website rather i'm looking forward to automate this entire process. I appreciate your help
|
|
|
|
|
you could write a small application yourself using
Convert.FromBase64String()[^]
and
Convert.ToBase64String()[^]
"If your actions inspire others to dream more, learn more, do more and become more, you are a leader." - John Quincy Adams
"Let me get this straight. You know her. She knows you. But she wants to eat him. And everybody's okay with this?" - Timon
|
|
|
|
|
Thanks for the idea i'll try that
|
|
|
|
|
Hi..
I'm new in asp.net. I'm not sure what is the best way to pass data to another form, change that data and back to the first page where I can see the new changed value.
Precisely,
I have Form1 with some fields. When I go to Form2, i want to see all data from Form1 and want to change that data. And then, when I back on Form1, I need to see that changed data.
My thoughts is to use session object to pass value to another form(Form2). But, if I use session, when I change data on another form I suppose I need to also change session object there to have new values, so I can see new values in first form.
Another way (not using the session) is just to use sql query(as I use in first page) and hit the DB on second page just to get the data.
Any suggestion? Maybe examples?
Thanks!
BobA
|
|
|
|
|
|
I want to create a folder named ErrorLog in Program files (where my application is going to be installed) and
But I am not able to create folder in Program file, Access is denied error fires.
Please help me
|
|
|
|
|
You have posted this on the ASP.NET forum. Does that mean you're trying to create a folder in Program Files directory from within a web app ?
|
|
|
|
|
That's a Windows security measure. While in certain circumstances I would change the folder's security settings to allow for such a thing, I would not do so with a web application - this is the asp.net forum. Rather create a different folder for your error logs with the tools which come for your web site, make it writable for the "user account" of your iis process, and write the file there.
|
|
|
|
|
It's difficult to say without any codesnippets.
I have with c# and .net experienced that folders and files are locked while traversing, or while updating file content.
Without knowing the context it's impossible to say.
I used myobject.dispose() on the file/folder-objects involved, and it solved my problems in that particular case.
But this sound like it has nothing to do with asp.net.
http://blog.kowalczyk.info/article/Getting-user-specific-application-data-directory.html[^]
|
|
|
|
|
I am an experienced programmer but a novice at ASP. Attempting a CDO email and when I click submit an HTML page appears with my ASP code listed at the top. My HTML page form begins with:
and then i have a standard form object with a submit button. for now, the entire content of aspmailform.asp code file is simply:
<%
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="mymail@mydomain.com"
myMail.To="myrealemailaddress@myrealemailcompany.com"
myMail.TextBody="This is a message."
myMail.Send
set myMail=nothing
%>
------
Any ideas what error would cause the ASP code to appear in the browser instead of running?
Thanks for your help!
- Scott
|
|
|
|
|
Wow, ASP. Thats going back a bit.
Here is an example
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = smtpserver
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Update
End With
strDesc = "Message contents"
With iMsg
Set .Configuration = iConf
.To = "myrealemailaddress@myrealemailcompany.com"
.From = "mymail@mydomain.com"
.Sender = "mymail@mydomain.com"
.ReplyTo = "mymail@mydomain.com"
.Subject = "Sending email with CDO"
.textbody = strDesc
.Send
End With
Set iConf= Nothing
You may have to tweak it a little, but should work.
Make sure IIS is configured to serve ASP pages as well. I don't think IIS 6+ is configured to do so by default.
|
|
|
|
|
|
Hi,
I have an ASP.net application, which gets data from Database. In that it gets datetime from data base. In database it contains milli seconds as well. But when it comes to .Net milli seconds are removed. So when I compare these dates, they are not equal. Is these any way to hold the date time field as it is in the database and send it to another stored proc for comparision.
thanks in advance.
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
Your problem more look like conversation of date time from database to your .net application. Please check how you fetching value from database to .net application.
|
|
|
|
|
Try using in this format :
ddMMMyyyy HH:mm:ss.ff
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
Hi there
I'm looking for the an answer for this:
why "myFlickr.UploadPicture("C:\h.jpg")"
the value is nothing, that path is rigth. So when I stop the VS.net it take a few seconds, and the Autenticated is True. I guess the Apikey and the Secret y rigth.
any idea?
Saludos
|
|
|
|
|
HI THERE
This was very simple to fix it.
FILEUPLOADER.SAVE("C:○\H.JPG").
Then I use de file in the path of server, that's all for this.
Saludos
|
|
|
|
|
I am create crystol report in asp.net in visual studio 2010 but crystol report toolbar Print Button Not working in Google chrome brouser
How to fix this error.
|
|
|
|
|
|
I am trying to get the value of a textbox once the user clicks the submit button.
I can get it using the following code but is there a better way? It makes no sense to me to actually view the source code to get
ctl00$ContentPlaceHolder1$DailyReceipts1$rpt_Ticket$ctl01$rpt_TicketDetail$ctl01$txt_qty
instead of coding to get it. Any help will be appreciated.
CODE in FRONT
<asp:ImageButton ID="imb_EditDetail" runat="server" AlternateText="Update Receipt" ImageUrl="edit.gif" OnClick="Update_TicketDetail" />
<ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server"
TargetControlID="imgEditDetail"
PopupControlID="pnl_EditQty"
BackgroundCssClass="modalBackground"
DropShadow="true"
OnOkScript="ok()"
CancelControlID="Btn_CancelEdit" />
<asp:Panel ID="pnl_EditQty" runat="server" CssClass="modalBox" Style="display: none;" Width="300">
<asp:Panel HorizontalAlign="Center" ID="Panel2" runat="server" >Edit Quantity</asp:Panel>
<asp:Label ID="lbl_Name" runat="server"></asp:Label><
<asp:TextBox ID="txt_qty" runat="server" ></asp:TextBox>
<asp:Button ID="Btn_Edit" runat="server" Text="Edit" Width="55px" OnClick="Btn_Edit_Item_Click" CausesValidation="true" Itm_idx="" ticket_idx="" history_idx="" old_qty="" Control_id="" />
<asp:Button ID="Btn_CancelEdit" runat="server" Text="Cancel" Width="55px" buttonAction="submitButton" />
</asp:Panel>
CODE BEHIND
protected void Btn_Edit_Item_Click(object source, EventArgs e)
{
string id = ((Button)source).CommandArgument.ToString();
string idx = ((Button)source).Attributes["Itm_idx"].ToString();
string ticket_idx = ((Button)source).Attributes["ticket_id"].ToString();
string history_idx = ((Button)source).Attributes["history_id"].ToString();
string oldQty = ((Button)source).Attributes["old_qty"].ToString();
string controlID = ((Button)source).Attributes["Control_id"].ToString();
string detail = ((Button)source).Attributes["detail"].ToString();
string itemQtyEdit = Request.Form["ctl00$ContentPlaceHolder1$Daily" + detail + "1$rpt_Ticket$ctl" + controlID + "$rpt_TicketDetail$ctl0" + idx + "$txt_qty"].ToString();
}
modified on Monday, February 28, 2011 8:14 AM
|
|
|
|
|
First, please format any code snippets you post using the "code block" toolbar item. This improves the readable and increases the chance you will actually get an answer. Read this[^]
Second, read some books on ASP.NET and C#.
string idx = ((Button)source).Attributes["Itm_idx"].ToString();
This is a useless conversion as Attributes are already strings and ToString() is a waste of processor cycles.
ctl00$ContentPlaceHolder1$DailyReceipts1$rpt_Ticket$ctl01$rpt_TicketDetail$ctl01$txt_qty
This is the clientId of the control in question and is not how you access a control in the code behind. You simple use the ID, txt_qty in this case. You certainly don't access it via the Form property.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Thanks but I cannot access txt_qty unless I use the Form property. Trust me, I would love too. Can you point me on the right direction?
|
|
|
|