|
Hi all,
Please any one suggest me how to get values from dynamically generated HTML control in server side code.
In my web page on clicking a button i am adding HTML select control using JavaScript, when I hit save button I have to store the selected values of dynamically generated controls. How to get all the HTML controls values from server side.
Thank you
Know is Drop, Unknown is Ocean
|
|
|
|
|
You cannot do that in C#. Try again...
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - out now! ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
As long as the control is in the form that you post to the server, you can use the Request.Form collection to get the value.
For further ASP.NET questions, use the ASP.NET forum.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hello,
I am new to mircrosoft speach SDK. I want to use it.
before I heard, this SDK can be used to recognize what you said. it is true?
how is the correctness? I have downloaded the SDK and tried to use one tool "callback",
it seems none of what I said to the computer is correctly repeated by the computer.
so what is the truth??
thanks.
|
|
|
|
|
|
Hi all...
I'll try my best to keep this query as compact as possible...
I'm currently working on a project that involves generating alarms/notifications for the Automated Distributed Control System at the company. Well, for this, the team has created Notification Client and Notification Server Applications.
There is also another .exe created that dumps a message (the message is taken from a database, by means of a function) into a Private queue (which can be viewed in the Computer Management tool). This .exe is intended to run alongside the Notification Server Application, which accesses the queue to obtain the messages, which are then displayed at the User Station by means of a method created (called rhsc_notifications; I'll detail that later).
The problem we are facing is that the display at the User station is truncated, i.e. in all fields, only the first character is displayed, and remaining data is missing. (The alarm/notification is displayed as multiple fields like Alarm generation location, priority, description, time, etc.).
This problem is faced when the Notification Server uses a method called rhsc_notifications directly. However, one of the team members created an interface in Visual Basic. This interface is called by the Notification Server, and the interface processes the message, and calls the rhsc_notifications method to display the message at the User Station. When this interface is used, the display turns out fine, no truncation. However, when the rhsc_notifications method is called directly from the Notification Server Application, there is truncation.
We are required to eliminate this interface, and call rhsc_notifications method directly. The thing is that this method uses a library that has NOT been developed in a .Net environment. Hence, there is the need to marshal the data.
We've tried a few things with marshaling, but the problem hasn't been resolved. So I'm hoping you guys will be able to help me out with this...
So, can I go ahead and post the code?
Thanks in advance...
Tunçay
|
|
|
|
|
You asked exactly the same question yesterday. And I did leave you a reply. You did not bother to respond.
Please dont spam the messageboards.
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - out now! ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
Hi...
Well, I'd typed the query out in a notepad file, and I guess when I saw it, I forgot the second day that I'd already posted it the previous day... sorry about that. Don't be upset , I didn't mean to spam the message board. It was a mistake, honest .
And I responded to your original reply now...
Maybe we should close this thread, and use only the original one... how do I do that?
Thanks (and sorry),
Tunçay Şanlı
|
|
|
|
|
Is there any code to stream a video file and play it over the internet?
|
|
|
|
|
Wrong forum. This is for C# questions.
(There's loads of ways. Here's one: http://flowplayer.org/[^] Google for more.)
Simon
|
|
|
|
|
|
|
hello,
i try to learn the 3tier-architecture
But there are a few question:
1.How can i fill a datagridview in my UI.
the grid should be filled by a dataset.
user can change the data in the grid.
How could this be realized ?
a) The DAL returns a dataset to the BAL and the BAL forwards the dataset to the UI?
b) The DAL returns a datatable to the BAL and the BAL creates a dataset and forwards it to the UI?
c) other?
2.How can i update the database ?
That should be realized with the DataAdapter, right?
bye jogi
|
|
|
|
|
The whole thing of separating the layers is about not letting the UI know that there is such a thing as a datalayer and vice versa. Thus, your question (the grid should be filled by a dataset) is misleading. A grid shouldn't be aware of the concept 'dataset' at all.
(I know that it is not always done this strict way, but then it is no proper 3tier architecture...)
Rather you have your BAL communicate with the DAL exclusively, and your UI is only allowed to talk with the BAL, not with the DAL.
Example:
You have a db table, say CUSTOMERS .
In your BL, you have a related business object, a Customer class. Additionally you have a class that gives the illusion of an in-memory collection of all customers, say CustomerRepository , that is used to access certain Customer objects or collections of them on demand. Internally, this CustomerRepository is using the DAL to persist your data.
The DAL is the layer used for mediating between your CUSTOMERS table and the Customer class.
Now, in your GUI, you can fill your grid with Customer instances instead of dataset rows.
Regards
Thomas
www.thomas-weller.de
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. Programmer - an organism that turns coffee into software.
|
|
|
|
|
Hi Thomas,
thanks for your help.
I made it like you described.
Now i have a list(List<customer>) of customers (like your example) in my grid.
How can i write the changed Data from the grid back to the DAL ?
Can i Update the grid in one Step ?
Or do i have to get the changed rows and update every changed row per code ?
bye jogi
|
|
|
|
|
Well, I assume that your grid and your Customer instances are automatically kept in sync all the time (you can achieve this by simply databinding your Customers collection to the grid - each property to its respective column). So it's a matter of how to persist the changed/new/deleted Customer instances from the BL to the db.
The DAL is responsible for updating/creating/deleting Customers , the BL has to maintain the necessary information. There are two approaches to the question How is the necessary information hold?: (1) It can be stored in the business object itself or (2) the Repository can maintain respective lists. In the first case the business objects would have each a Dirty and a Deleted property (New can normally be seen from the fact that new objects have no ID yet...), in the second the respective repository would maintain lists of changed/new/deleted objects. The second approach is the cleaner one, since in this case the business objects do not expose persistence related stuff at all. It's also faster, if you have to manage very large lists.
So, in our example, it would go like this:
The user changes sth. in the grid, e.g. a Customers firstname from 'John' to 'Mike'.
This changes the related Customer instances Firstname property respectively. Inside this property setter, either an internal Dirty-Flag is set to true (1) or the Customer instance tells its Repository that it has been changed (2).
Now the User clicks on the Save button, which would result in a call to CustomerRepository.SaveAll or sth. similar. SaveAll would cause the repository to go through the list of Customers and save/delete/create all as indicated by their respective properties (1), or the repository would ask its own internal lists to do this (2). The repository then calls the DAL to do the persistence stuff, wrapped inside a db transaction.
Regardless of the exact implementation details, the UI simply calls SaveAll , and that's it. It is totally agnostic of what goes on behind the scenes.
(Often, an object-relational mapper (like e.g. NHibernate or MS Entity Framework, to name just two) is used to automate all this persistence stuff like keeping DB and BL in sync, caching etc. Admittedly, it's a bit complicated to learn, but it pays. This article on CP might give you a good overall picture, if you are willing to invest some time and effort: NHibernate Best Practices with ASP.NET, 1.2nd Ed.[^])
Regards
Thomas
www.thomas-weller.de
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. Programmer - an organism that turns coffee into software.
|
|
|
|
|
Hi Guys,
I can log msg in event log in my local computer. I want to do the same remotely...
I find MachineName property in EventLog class, but didn't work...
Your help could be useful.
Following is my code snippet:
EventLog sysLog=new EventLog();
sysLog.MachineName="00C0D0C10F4A";
if(!EventLog.SourceExists("Application-1"))
EventLog.CreateEventSource("Application-1","SystemLog");
EventLog.WriteEntry("Application-1","Hi",EventLogEntryType.Warning,235);
thax
Thanks,
Chintan(India)
|
|
|
|
|
Try to using WMI. It will be very easy !!
cheers,
Abhijit
|
|
|
|
|
is there any other event rather than Datagridview _EditingControlShowing which e.control need to be cast to combobox type
sadara
|
|
|
|
|
Hello all, Here is my scenario.
1. Client App (Smart/Web) installed on Machine A.
2. Remoting Object is hosted in IIS on Machine A or B.
I need to create a unit testing (am using NUnit , but that doesn't matter i guess), where client makes a call and transfers some data in call context. Request hits IIS/Remoting object and based on information in call context server does something.
1. Unit testing for Client components , whether it is sending right information, is easy just call components of client.
2. I need to test whether the same data is properly available to server (transported properly to server) and processed it. I am not sure how to proceed and create a scenario Remoting (hosted in IIS) and server Unit Test components.
Something like Client->Remoting object on IIS->Server process request.
Any suggestions greatly appreciated. (Am using HTTPChannel for remoting)
Thanks.
|
|
|
|
|
Hi friends,
What is maximum size of data we can write to port & read from port?
Is there any limit to it?
Reagards
Shiva
|
|
|
|
|
if you use System.IO.Ports.SerialPort component the maximum size of data to read = SerialPort.ReadBufferSize and maximum size of data to write = SerialPort.WriteBufferSize. But you can adjust them as necessary.
The ReadBufferSize property default 4096 ignores any value smaller than 4096.
The WriteBufferSize property default 2048.
i don't know the maximum limit, but i think is Int32.MaxValue
any ideas?
dhaim
ing ngarso sung tulodho, ing madyo mangun karso, tut wuri handayani. "Ki Hajar Dewantoro"
in the front line gave a lead, in the middle line build goodwill, in the behind give power support
|
|
|
|
|
hi friends
I have created one ssis package using interface, it works fine
flow is like
oledbdatasource ->
conditional splits like
--> if action = 1 then oledb command 1 -> oledbcommand2
if action = 2 then oledb command 3 -> oledbcommand4
default output of conditional split
to oledb destination
i want to do this using C#.
all the components like conditional split and oledbcommand should be add on the fly.
any one can give me a hint or url for this.
thanks so much
|
|
|
|
|
i want to create report with report viewer and then came up this error at runtime
here is my code
inventoryInfoReport.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Local; inventoryInfoReport.LocalReport.ReportPath = CitronConfiguration.ReportPath + "InventoryInfoReport.rdlc";
InventoryInfoDataSet inventoryDataSetObj = new InventoryInfoDataSet();
IList<inventorycatalog> inventoryCatalogList = new InventoryCatalogSystem().GetInventoryCatalogList();
foreach (InventoryCatalog inventoryCatalog in inventoryCatalogList)
{
DataRow row = inventoryDataSetObj.Tables[0].NewRow();
row["InventoryId"] = inventoryCatalog.InventoryId;
row["InventoryName"] = inventoryCatalog.InventoryName;
row["Stock"] = Library.DecimalToCurrency(inventoryCatalog.Stock);
row["IdealStock"] = Library.DecimalToCurrency(inventoryCatalog.IdealStock);
row["Balance"] = Library.DecimalToCurrency(inventoryCatalog.Balance);
inventoryDataSetObj.Tables[0].Rows.Add(row);
}
ReportDataSource objDataSource = new ReportDataSource("InventoryInfoDataSet_DataTable1", inventoryDataSetObj.Tables[0]);
inventoryInfoReport.LocalReport.DataSources.Add(objDataSource); <--the error was here
can some one help me please?
|
|
|
|
|
Which line blows up ? I assume you're mixing types and need to do some sort of conversion somewhere.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|