|
It appears it is because my CAS box doesn't have impersonation rights ... can anyone confirm this?
|
|
|
|
|
I'm no Exchange expert so I couldn't tell you. I also don't have an installation I can test any code against.
|
|
|
|
|
Hi,
I am having problem with the validation summary. I have radiobuttons where I kept requiredFieldValidation and all these are inside the gridview like shown below:
<asp:panel id="pnlEval" runat="server" enabled="false">
* Denotes required entry
<asp:validationsummary id="ValidationSummary" runat="server" forecolor="" headertext="<p class="valSummaryHeader">Please correct the following:</p>">
<div class="questionHeader">
<asp:label id="lblQHeader" runat="server" text="Questions" cssclass="question">
<asp:label id="lblAns1" runat="server" cssclass="answer">
<asp:label id="lblAns2" runat="server" cssclass="answer">
<asp:label id="lblAns3" runat="server" cssclass="answer">
<asp:label id="lblAns4" runat="server" cssclass="answer">
<asp:label id="lblAns5" runat="server" cssclass="answer">
</div>
<div class="questionDetails">
<asp:label id="lblQues1" runat="server" cssclass="question">
<asp:requiredfieldvalidator id="rfvQuest1" runat="server" controltovalidate="radAns1"
="" errormessage="All the questions must be answered" cssclass="valError" display="Static" forecolor="">!
<asp:radiobuttonlist id="radAns1" repeatdirection="Horizontal" runat="server" cssclass="answerGroup">
<asp:listitem value="1" text="">
<asp:listitem value="2" text="">
<asp:listitem value="3" text="">
<asp:listitem value="4" text="">
<asp:listitem value="5" text="">
</div>
<div class="questionDetails">
<asp:label id="lblQues2" runat="server" cssclass="question">
<asp:requiredfieldvalidator id="rfvQuest2" runat="server" controltovalidate="radAns2"
="" errormessage="All the questions must be answered" cssclass="valError" display="Dynamic" forecolor="">!
<asp:radiobuttonlist id="radAns2" repeatdirection="Horizontal" runat="server" cssclass="answerGroup">
<asp:listitem value="1" text="">
<asp:listitem value="2" text="">
<asp:listitem value="3" text="">
<asp:listitem value="4" text="">
<asp:listitem value="5" text="">
</div>
<div>
<asp:label id="lblQues3" runat="server" cssclass="question">
<asp:requiredfieldvalidator id="rfvQuest3" runat="server" controltovalidate="radAns3"
="" errormessage="All the questions must be answered" cssclass="valError" display="Dynamic" forecolor="">!
<asp:radiobuttonlist id="radAns3" repeatdirection="Horizontal" runat="server" cssclass="answerGroup">
<asp:listitem value="1" text="">
<asp:listitem value="2" text="">
<asp:listitem value="3" text="">
<asp:listitem value="4" text="">
<asp:listitem value="5" text="">
</div>
<div>
<asp:label id="lblQues4" runat="server" cssclass="question">
<asp:requiredfieldvalidator id="rfvQuest4" runat="server" controltovalidate="radAns4"
="" errormessage="All the questions must be answered" cssclass="valError" display="Dynamic" forecolor="">!
<asp:radiobuttonlist id="radAns4" repeatdirection="Horizontal" runat="server" cssclass="answerGroup">
<asp:listitem value="1" text="">
<asp:listitem value="2" text="">
<asp:listitem value="3" text="">
<asp:listitem value="4" text="">
<asp:listitem value="5" text="">
</div>
<div>
<asp:label id="lblQues5" runat="server" cssclass="question">
<asp:requiredfieldvalidator id="rfvQuest5" runat="server" controltovalidate="radAns5"
="" errormessage="All the questions must be answered" cssclass="valError" display="Dynamic" forecolor="">!
<asp:radiobuttonlist id="radAns5" repeatdirection="Horizontal" runat="server" cssclass="answerGroup">
<asp:listitem value="1" text="">
<asp:listitem value="2" text="">
<asp:listitem value="3" text="">
<asp:listitem value="4" text="">
<asp:listitem value="5" text="">
</div>
<div>
<asp:label id="lblQues6" runat="server" cssclass="question">
<asp:requiredfieldvalidator id="rfvQuest6" runat="server" controltovalidate="radAns6"
="" errormessage="All the questions must be answered" cssclass="valError" display="Dynamic" forecolor="">!
<asp:radiobuttonlist id="radAns6" repeatdirection="Horizontal" runat="server" cssclass="answerGroup">
<asp:listitem value="1" text="">
<asp:listitem value="2" text="">
<asp:listitem value="3" text="">
<asp:listitem value="4" text="">
<asp:listitem value="5" text="">
</div>
<asp:button id="btnSubmit" runat="server" text="Submit" onclick="btnSubmit_Click">
And now when i run the program, even before i click the submit button, the validation summary is showing. I want this summary to show only after I click the submit button and if there is any radio button unchecked.
Can anyone tell me where I have done mistake?
<div class="signature">suchita</div>
|
|
|
|
|
I don't know ASP, so can't comment. Though, apart from accidentally wrapping the last part of your question in the pre tags, there is one thing that's perhaps (hopefully) a mistake.
You might notice that this is a C# forum. Clearly your code is ASP.
Perhaps you'd get a better response if you posted it here[^]
|
|
|
|
|
|
Couldn't you just set the caption to "PINview +"?
/ravi
|
|
|
|
|
I have an icon that I want to use
|
|
|
|
|
|
There's an article on CodeProject[^] how to draw in the title bar of a form.
Bastard Programmer from Hell
|
|
|
|
|
|
You're welcome
|
|
|
|
|
Not sure why this got a downvote, it's not a trivial 'gimme codez' question.
|
|
|
|
|
Hello!
I cannot change the password in System.Data.Sqlite DB.
Here is the code:
_DB = new SQLiteConnection("Data Source=" + db + String.Format(";Password={0}",
Convert.ToBase64String(password)));
Later I do this:
_DB.SetPassword(Convert.ToBase64String(newPassword));
But when I open the DB again, I get the error:
"File is encrypted or is not a database..." - the same when open with wrong password.
But after changing the password this way, the DB is still OK until application close.
If I do:
_DB.Open();
_DB.ChangePassword(Convert.ToBase64String(password));
_DB.Close();
I cannot access DB after this.
|
|
|
|
|
amrok2amrokk wrote: _DB.SetPassword(Convert.ToBase64String(newPassword));
This line isn't intended to change a password. In SqlLite, you use this to set the password for the database before you issue the Open command.
|
|
|
|
|
Well, it seems
SetPassword() has to be issued before every
Open() after
ChangePassword() has been called.
|
|
|
|
|
There is something strange going on. It's written in documentation:
SQLiteConnection.Open Method
Opens the connection using the parameters found in the ConnectionString
But when I change the password
DB.Open(); DB.ChangePassword("newpass"); DB.Close(); and change the password parameter in connection string, I still cannot decrypt DB with new password.
|
|
|
|
|
So I fixed that: changed Base64 string to UTF8 and with update of ConnectionString it works now.
Thanks
|
|
|
|
|
private DataTable AddNewRowToGrid()
{
int rowIndex = 0;
if (ViewState["CurrentTable"] != null)
{
DataTable dtCurrentTable = (DataTable)ViewState["CurrentTable"];
DataRow drCurrentRow = null;
if (dtCurrentTable.Rows.Count > 0)
{
for (int i = 1; i <= dtCurrentTable.Rows.Count; i++)
{
drCurrentRow = dtCurrentTable.NewRow();
dtCurrentTable.Rows[i - 1]["EffectFrom"] = ((TextBox)mdlpopupGrid.Rows[rowIndex].Cells[1].FindControl("txtEffectFrom")).Text;
dtCurrentTable.Rows[i - 1]["EffectivePercentage"] = ((TextBox)mdlpopupGrid.Rows[rowIndex].Cells[2].FindControl("txtEffectivePercentage")).Text;
dtCurrentTable.Rows[i - 1]["Grade_Salary"] = ((TextBox)mdlpopupGrid.Rows[rowIndex].Cells[3].FindControl("txtGradeSalary")).Text;
rowIndex++;
}
dtCurrentTable.Rows.Add(drCurrentRow);
ViewState["CurrentTable"] = dtCurrentTable;
return dtCurrentTable;
}
}
}
This code gives me the Fallowing Error:
Not all code paths return a value plss Help !!
|
|
|
|
|
insert return null; before the last }
|
|
|
|
|
Can SARIGÜL wrote:
insert return null; before the last }
not working actually
I want this Function result to be used as Datatable to fill a Gridview.
return null will work
|
|
|
|
|
The reason it's given you this message is because you have the condition to test if the ViewState is not null. What happens if ViewState["CurrentTable"] is null? (You have a similar issue if dtCurrentTable.Rows.Count == 0 . To fix this, return an empty DataTable from the method (most style guides recommend not returning null).
|
|
|
|
|
Add:
else
{
return null;
}
before last '}'.
|
|
|
|
|
I'm working on a program that will convert a wav-file to mp3, tag it and then upload it via FTP.
I'm done with the FTP-part and am now working on the converting to MP3 part (the only thing left).
The plan is to use LAME (lame_enc.dll) to do the encoding/converting (unless you have any other suggestion). But I've hit a snag.
I couldn't find any good examples for Lame & .NET. I found this here on TCP: C# MP3 Compressor[^]
It wouldn't compile due to missing form components, but I copied the the classes that's relevant.
The project compiles but I get an exception on the call to beInitStream (in the constructor of Mp3Writer). The error states:
PInvokeStackImbalance was detected
and that "the managed PInvoke signature didn't match the unmanaged target signature" (translated from Swedish).
Is there anyone that has an idea what's wrong?! Is this code written for an older version of lame_enc.dll (I've looked at the documentation, but can't see the problem)?
I also tried to use IntPtr etc (found in another example for another DLL), but same result:
Marshal.StructureToPtr(Marshal.SizeOf(m_Mp3Config), Marshal.AllocHGlobal(pConfig), false);
uint LameResult = Lame_encDll.beInitStream(ref pConfig, ref m_InputSamples, ref m_OutBufferSize, ref m_hLameStream);
Code for DLL import:
[DllImport("Lame_enc.dll")]
public static extern uint beInitStream(ref BE_CONFIG pbeConfig, ref uint dwSamples, ref uint dwBufferSize, ref uint phbeStream);
or
[DllImport("Lame_enc.dll")]
public static extern uint beInitStream(ref IntPtr pbeConfig, ref uint dwSamples, ref uint dwBufferSize, ref uint phbeStream);
I could just call lame.exe, but I don't want to do it, mainly because I want to report the progress.
Glad for any help/ideas!
|
|
|
|
|
Hi,
P/Invoke stack problems are caused by a calling convention mismatch. This[^] may help you.
|
|
|
|
|
A stack imbalance means either you passed the wrong number of parameters, or you used the wrong calling convention (which essentially amounts to the same thing underneath).
|
|
|
|