|
I am creating a 5 star rating control. For this I have created a user control with the Callback functionality. When I implement the usercontrol on an aspx page, I want that the label control to populate the value of the image that was clicked. But, when I debug my application, it shows that the label control has the value and it does not show on the page. Following is the code I am using for the User Control:
public event System.Web.UI.WebControls.CommandEventHandler Rater;
protected void Page_Load(object sender, EventArgs e)
{
sCallBackFunctionInvocation = Page.ClientScript.GetCallbackEventReference(this, "message", "ShowSuccess",
"context");
String callbackScript;
callbackScript = "function CallServer(message, context)" +
"{ " + sCallBackFunctionInvocation + ";}";
Page.ClientScript.RegisterClientScriptBlock(this.GetType(),
"CallServer", callbackScript, true);
}
public void RaiseCallbackEvent(string eventArgument)
{
if (hdn.Value.ToString() == "" && (eventArgument == "0" || eventArgument == string.Empty))
{
returnValue = "0";
totChecked = returnValue;
hdn.Value = returnValue;
}
else
{
returnValue = eventArgument;
hdn.Value = returnValue;
totChecked = returnValue;
CommandEventArgs args = new CommandEventArgs("Rated", hdn.Value.ToString());
Rater(this, args);
}
}
public string GetCallbackResult()
{
return returnValue;
}
The following code is used for aspx page
protected void Page_Load(object sender, EventArgs e)
{
rc1.Rater += new CommandEventHandler(rc_Rater);
}
private void rc_Rater(object sender, CommandEventArgs e)
{
RatingControl rc = new RatingControl();
lbl.Text = e.CommandArgument.ToString();
}
-----Have A Nice Day-----
|
|
|
|
|
Probably best to ask this in the ASP[^] forum.
Simon
|
|
|
|
|
Hello,
I'm using the web browser control to read html files but I want to get the source code of these files but I can't?
Thanks
Dad
|
|
|
|
|
do u want html code of these files??
then it is possible without Web Browser CONTROL
|
|
|
|
|
Hi,
I have developed a windows sservice on my dev machine.
The project installer is also created.
This service is tested on my machine and it is fine.
Now I would like to give it to the management to install/run it on the required machine.
Question:
How should this windows service application be setup on the requred machine which may or may not have .net framework?
Thanks
|
|
|
|
|
if(!TargetMachineHasDotNetFramework)
{
InstallRequiredDotNetFramework();
}
InstallWindowsService();
well, you did ask in the C# forum.
|
|
|
|
|
I think you mis-understood.
I would like to know how to install the windows service on another machine? I mean do I just copy the whole development codes to the other machine, etc?
Thanks
|
|
|
|
|
You said you had an installer for your service, wouldn't logic tell you to install your service you would use the installer?
|
|
|
|
|
On my machine which has visual studio, I run the vs command to install or un-install the service.
The question is:
What do I do if this service needs to be installed on another machine? If the installer is required for this purpose, then how do I run it on another machine. I believe I can not get vs command on the other machine.
Hope you follow my question.
Thanks
|
|
|
|
|
arkiboys wrote: What do I do if this service needs to be installed on another machine
Easiest way is to create an installer, take that installer to the other machine and run it.
A Google search[^] will provide you with a plethora of information on the subject.
|
|
|
|
|
To install the Windows Service on another machine you would add a
Setup project to your solution which would then create an MSI package.
Run the MSI package on the target machine and this will create the Windows Service.
Obviously you would need the relevant .NET Framework version on the target machine.
|
|
|
|
|
Can I do this by the click once method to install the service on another machine?
Thanks
|
|
|
|
|
I highly doubt ClickOnce will work for services
|
|
|
|
|
Hi,
How can i save value from textbox into database
or change some value in database with value in textbox.
|
|
|
|
|
Read some books/tutorials, your question is so vague, I assume you are a beginner. You will need some background knowlegde on the process, but once you do, you will find it is trivial
|
|
|
|
|
|
Hi Guys,
I have one batch file. I set argument in it and when I double click the bat file,it work perfectly . Argument only suggest to execute other SSIS packages on a given path.
Argument is:
FOR %%V IN (*.dtsx) DO dtexec /f "%%V" /Config "cfg%%~nV.dtsConfig" >> log_PkgExecution.txt
pause
Now, I want to set the same argument in SSIS Package called "Execute Process Task" in Execute Process Task editor -> Argument property. I did it, but getting problem during execution.
On executing the package, DOS prompt is coming blank...
I think, it is not getting the argument...
Please help, if I am doing something wrong.
Thanks in advance.
Chintan
|
|
|
|
|
Chintan.Desai wrote: On executing the package, DOS prompt is coming blank...
It will be. You are redirecting output to the log_PkgExecution.txt file. Have a look in there.
Your question is also not C# related.
|
|
|
|
|
Thx for the reply
Log file is showing the following:
Microsoft (R) SQL Server Execute Package Utility
Version 9.00.1399.06 for 32-bit
Copyright (C) Microsoft Corp 1984-2005. All rights reserved.
Started: 12:19:02 PM
DTExec: Stopping the package execution.
Started: 12:19:02 PM
Finished: 12:19:10 PM
Elapsed: 7.938 seconds
I couldn't see the rows affected in my DB by packages which are executed by this bat file...In short, this batch file is not executing the argument.
Regards
Chintan
modified on Tuesday, July 15, 2008 5:18 AM
|
|
|
|
|
I have a textbox called "textBox6.text" in a C# Windows Application in Visual Studio, and i want that the text entered by the user in the textbox should be added to the "PURPOSE" field in a table "TABLE2_HDB1" in Oracle database "HDB1" on clicking a "submit" button.
the coding for submit button is as follows:-
private void button1_Click(object sender, EventArgs e)
{
string OracleStmt;
string ConString;
OleDbConnection cn = null;
OleDbCommand cmd = null;
try
{
OracleStmt = "insert into TABLE2_HDB1(PURPOSE) values(@PURPOSE)";
ConString = " Provider=MSDAORA;Data Source=HDb1;User Id=SYSTEM
;Password=*****;";
cn = new OleDbConnection(ConString);
cmd = new OleDbCommand(OracleStmt, cn);
cmd.Parameters.Add(new OleDbParameter("@PURPOSE", OleDbType.VarChar , 20));
cmd.Parameters["@PURPOSE"].Value = textBox6.Text;
cn.Open();
cmd.ExecuteNonQuery();
textBox8 .Text = "record inserted successfully";
}
catch (Exception ex)
{
textBox8 .Text = ex.Message;
}
finally
{
cn.Close();
}
}
on executing this code u get the error :-
ORA-00936:missing expression
plz. help
|
|
|
|
|
Hello friends can any one tell me how can I get the total number of records found and print that on top my report?
|
|
|
|
|
Hello everyone,
When using !threads command to monitor thread status for a dump, there is an error message. Does anyone meet this before? What is wrong?
0:001> !threads
Failed to load data access DLL, 0x80004005
Verify that 1) you have a recent build of the debugger (6.2.14 or newer)
2) the file mscordacwks.dll that matches your version of mscorwks.dll is
in the version directory
3) or, if you are debugging a dump file, verify that the file
mscordacwks_<arch>_<arch>_<version>.dll is on your symbol path.
4) you are debugging on the same architecture as the dump file.
For example, an IA64 dump file must be debugged on an IA64
machine.
You can also run the debugger command .cordll to control the debugger's
load of mscordacwks.dll. .cordll -ve -u -l will do a verbose reload.
If that succeeds, the SOS command should work on retry.
If you are debugging a minidump, you need to make sure that your executable
path is pointing to mscorwks.dll as well.
thanks in advance,
George
|
|
|
|
|
Hello everyone,
The exception is occured in EventLog.WriteEntry, error message and error stack are listed below. Does anyone have any ideas?
"A device attached to the system is not functioning"
System.Diagnostics.EventLog.InternalWriteEvent(UInt32, UInt16, System.Diagnostics.EventLogEntryType, System.String[], Byte[], System.String)
System.Diagnostics.EventLog.WriteEntry(System.String, System.Diagnostics.EventLogEntryType, Int32, Int16, Byte[])
System.Diagnostics.EventLog.WriteEntry(System.String, System.Diagnostics.EventLogEntryType, Int32)
thanks in advance,
George
|
|
|
|
|
George_George wrote: A device attached to the system is not functioning
I guess some required DLL's are missing. Are you getting this for all application or only for this one ?
|
|
|
|
|
Only for this application, N a v a n e e t h!
And this happens only once, looks strange. Any ideas? What do you mean DLL missing? Which DLL? CLR DLL?
regards,
George
|
|
|
|