|
For one of the arrays mentioned in the body of your for loop, you must be referencing an element index that does not exist.
Step through your code using the debugger and you should be able to figure out the cause of the problem.
Paul Marfleet
|
|
|
|
|
I think you are interating countVisitorVarRows too early
It is declared 0
then countVisitorVarRows++ before the values are added
you are off by one index number. Do a small trace and you can see this
Hope this helps
I love programming!
|
|
|
|
|
I embeded this object to my aspx page.
<code><OBJECT id="Player" style="WIDTH: 121.92%; HEIGHT: 265px" height="265" width="121.92%" classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6"
>
<PARAM NAME="URL" VALUE="path">
<PARAM NAME="rate" VALUE="1">
<PARAM NAME="balance" VALUE="1">
<PARAM NAME="currentPosition" VALUE="1">
<PARAM NAME="defaultFrame" VALUE="">
<PARAM NAME="playCount" VALUE="10">
<PARAM NAME="autoStart" VALUE="-1">
<PARAM NAME="currentMarker" VALUE="0">
<PARAM NAME="invokeURLs" VALUE="-1">
<PARAM NAME="baseURL" VALUE="">
<PARAM NAME="volume" VALUE="100">
<PARAM NAME="mute" VALUE="0">
<PARAM NAME="uiMode" VALUE="full">
<PARAM NAME="stretchToFit" VALUE="0">
<PARAM NAME="windowlessVideo" VALUE="0">
<PARAM NAME="enabled" VALUE="-1">
<PARAM NAME="enableContextMenu" VALUE="0">
<PARAM NAME="fullScreen" VALUE="0">
<PARAM NAME="SAMIStyle" VALUE="">
<PARAM NAME="SAMILang" VALUE="">
<PARAM NAME="SAMIFilename" VALUE="">
<PARAM NAME="captioningID" VALUE="">
<embed src="path" width="100%" height="223" autostart="1" align="middle" url="path" volume="100"
stretchtofit="100%"> </embed>
</OBJECT>
</code>
path look like D:\song.wma
It can't play this song.Please help me !
nothing
|
|
|
|
|
What has this got to do with C#?
The Web Development forum would be more appropriate for this type of question.
Paul Marfleet
|
|
|
|
|
For a musician C# is the closest thing to D (as in D:\song.wma), only half a tone off.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
As is E♭. Although AFAIK there's no such language, so C# will have to do...
Paul Marfleet
|
|
|
|
|
Well there is E[^] and F#[^] and probably a lot more, but they didn't get their own CP forum yet...
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Yeah, just because its in an aspx page, doesn't make it a c# problem. And besides, isn't there an ASP .NET section anyways?
My current favourite word is: Waffle
Cheese is still good though.
|
|
|
|
|
I have a C++ dll. I would like to use a C# to access two methods within that dll. What is the best way to do this. I cannot seem to find much information on getting the C# app to talk to the C++ dll.
Is this possible?
If so, how?
Thanks,
cw
|
|
|
|
|
|
I tried placing
[DllImport("My.dll")]
static extern int MakeQUERY(string strTag) ;
Inside my C# class. The call MakeQUERY is in my C++ dll.
But when i try to build this, i get an error:
"The type or namespace name "DllImport" could not be found(are you missing a
using directive or an assembly reference)
|
|
|
|
|
Yeah, that happens a lot.
It typically means you are missing a using directive or an assembly reference
(and probably both).
Have a look at some other program that tries to do what you are trying, i.e.
search CodeProject (or Google) for "DllImport"
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
You will need to add this one line to able to use DllImport.
using System.Runtime.InteropServices;
Cheers.
------------------------------------------------------------------
Life would have been much easier if I had the source-code!!
|
|
|
|
|
Thanks that got me further.
Now it is throwing a System.EntryPointNotFound error.
My dll looks like this.
#include "stdafx.h"
#include "Mydll.h"
#include <atlcomtime.h>
#include <tchar.h>
#include <vector>
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
return TRUE;
}
DLL_API MakeQUERY(LPCSTR strTH, LPCSTR strEH, LPCSTR strSenderID, std::string strPath)
{
}
I added this to my C# declaration
[DllImport("LCIBroker.dll", EntryPoint = "DllMain")]
But it still cannot find the EntryPoint. Is there something that i am missing?
|
|
|
|
|
I have a webform.aspx like this :
<body MS_POSITIONING="GridLayout"><br />
<form id="Form1" method="post" runat="server"><br />
<asp:Panel id="Panel1" style="Z-INDEX: 102; LEFT: 24px; POSITION: absolute; TOP: 24px" runat="server"<br />
Width="210px" Height="272px">Panel <br />
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="300" border="1"><br />
<TR><br />
<TD><br />
<OBJECT id="Player" style="WIDTH: 121.92%; HEIGHT: 265px" height="265" width="121.92%" classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6"<br />
VIEWASTEXT><br />
<PARAM NAME="URL" VALUE="path"><br />
<PARAM NAME="rate" VALUE="1"><br />
<PARAM NAME="balance" VALUE="1"><br />
<PARAM NAME="currentPosition" VALUE="1"><br />
<PARAM NAME="defaultFrame" VALUE=""><br />
<PARAM NAME="playCount" VALUE="10"><br />
<PARAM NAME="autoStart" VALUE="-1"><br />
<PARAM NAME="currentMarker" VALUE="0"><br />
<PARAM NAME="invokeURLs" VALUE="-1"><br />
<PARAM NAME="baseURL" VALUE=""><br />
<PARAM NAME="volume" VALUE="100"><br />
<PARAM NAME="mute" VALUE="0"><br />
<PARAM NAME="uiMode" VALUE="full"><br />
<PARAM NAME="stretchToFit" VALUE="0"><br />
<PARAM NAME="windowlessVideo" VALUE="0"><br />
<PARAM NAME="enabled" VALUE="-1"><br />
<PARAM NAME="enableContextMenu" VALUE="0"><br />
<PARAM NAME="fullScreen" VALUE="0"><br />
<PARAM NAME="SAMIStyle" VALUE=""><br />
<PARAM NAME="SAMILang" VALUE=""><br />
<PARAM NAME="SAMIFilename" VALUE=""><br />
<PARAM NAME="captioningID" VALUE=""><embed src="path" width="100%" height="223" autostart="1" align="middle" url="path" volume="100"<br />
stretchtofit="100%"> </embed><br />
</OBJECT><br />
</TD><br />
</TR> </TABLE><br />
<br />
</asp:Panel><br />
</form><br />
</body>
And a webform.aspx.cs like this
private void Page_Load(object sender, System.EventArgs e)<br />
{<br />
Utility = new CCUtility(this); <br />
string id_bh = Request.QueryString["item_id"];<br />
id_BH = Convert.ToInt32(id_bh) ;<br />
string sSql = "SELECT Link FROM tblBaiHat WHERE id_BaiHat='" + id_bh + "'";<br />
SqlDataAdapter dad = new SqlDataAdapter(sSql,Utility.Conn);<br />
DataSet dts = new DataSet();<br />
dad.Fill(dts,"tblBaiHat");<br />
path= (string)dts.Tables[0].Rows[0]["Link"];<br />
Panel1.DataBind();<br />
}
Variable path look like 'D:\song.wma' for example.
Why WMP can't play this song.Help me please !
-- modified at 13:56 Tuesday 23rd October, 2007
nothing
|
|
|
|
|
whale84 wrote: string sSql = "SELECT Link FROM tblBaiHat WHERE id_BaiHat='" + id_bh + "'";
Can you spell SQL Injection[^]?
As for the rest - are you assigning the path to the media player at all? Doesn't look like it.
But fortunately we have the nanny-state politicians who can step in to protect us poor stupid consumers, most of whom would not know a JVM from a frozen chicken. Bruce Pierson Because programming is an art, not a science. Marc Clifton
|
|
|
|
|
HI i just created a setup project of my c# application. the primary output has been added to the application folder. and i am getting the default path as c:/programfiles/productname....
i want to change that, i mean i need the default installation flder as c:/productname....
My small attempt...
|
|
|
|
|
Right-click the Application Folder in the left pane and choose Properties Window from its Context menu. In the Properties Window, notice that the DefaultLocation property contains the information that defines the default installation location. The items in brackets are tokens that get replaced when the user is running the setup program. The Manufacturer token pulls its value from the company name you entered when you installed C#.
Visit my blog at http://dotnetforeveryone.blogspot.com
|
|
|
|
|
Hi all,
I have a listbox and i have some items in it but when i select these items
, these items flicker .
so, can anyone help me how can i solve this problem?
Praveen Sharma
|
|
|
|
|
Hi,
when the selection changes, the affected items get painted again.
1.
Is the ListBox painting itself (not userdraw)? if so:
Are your ListBox items simple strings? or complex objects whose ToString() takes some time?
2.
Is the ListBox userdrawn? if so:
is your DrawItem handler taking some time, e.g. fetching data from a database?
Maybe showing some code would help us help you.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Hi,
I am trying to create a setup program to deploy a .net 2 web app. When I right-click on the setup project and then go Add -> Project Output, I only see "Content Files" in the Add Project Output Group dialog box. Why do I not see the other options like "Primary output".
Any help would be greatly appreciated. Thanks in advance.
Regards,
|
|
|
|
|
hei.. add a new sepup project in the same solution ... then right click that setup project u wil see "add"... from there you can see "project output" . upon selecting that optio you will get the provision to select the primary output . please check the combo box which is at the top, it will contain the project name.
My small attempt...
|
|
|
|
|
I can see "primary output" for a Windows project but Not for a Web Project? Can you see it for a Web Project?
|
|
|
|
|
what are you going to do with "setup" for web project. want to install web page anywhere.. are you crazy????
My small attempt...
|
|
|
|
|