But if we need to pass around 15 values or more it's not possible because we get an error as querystring lenght exceeds
Where did you get the error from?
Dear sai_3289, the link you referred in earlier post is related to converting the state of object (C# object to be precise) in to a serial stream so that it can be saved/transmitted in to a database/server/file/memory/console/where ever you want it to go. One important point here is that serialization format is specific to C# object types. Note the the link says "Serialization is the process of taking the state of an object and persisting it in some fashion". The last couple of words are important
Now, if I understood your post/question correctly, you are tying to convert a C++ (may be a QT C++ objcet) into a serial stream. Well you can do it but don't expect it work with your C#.Net application.
Here is just an example
class clsPerson
{
public:
};
clsPerson p;
p.FirstName = "Jeff";
p.MI = "A";
p.LastName = "Price";
QXmlStreamWriter stream(&serial);
stream.setAutoFormatting(true);
stream.writeStartDocument();
stream.writeStartElement("clsPerson");
stream.writeAttribute("xmlns:xsi", "?");
stream.writeAttribute("xmlns:xsd", "?");
stream.writeTextElement("FirstName",p.FirstName);
stream.writeTextElement("MI",p.MI);
stream.writeTextElement("LastName",p.LastName);
stream.writeEndElement();
stream.writeEndDocument();
qDebug() << serial.toStdString().c_str();
class clsPerson
{
public:
QString FirstName;
QString MI;
QString LastName;
};
clsPerson p;
p.FirstName = "Jeff";
p.MI = "A";
p.LastName = "Price";
QString serial;
QXmlStreamWriter stream(&serial);
stream.setAutoFormatting(true);
stream.writeStartDocument();
stream.writeStartElement("clsPerson");
stream.writeAttribute("xmlns:xsi", "?");
stream.writeAttribute("xmlns:xsd", "?");
stream.writeTextElement("FirstName",p.FirstName);
stream.writeTextElement("MI",p.MI);
stream.writeTextElement("LastName",p.LastName);
stream.writeEndElement();
stream.writeEndDocument();
qDebug() << serial.toStdString().c_str();
To copy to clipboard, switch view to plain text mode
Bookmarks