|
There's an XmlTextWriter class, or similar, which allows you to make API calls and it will make sure the XML is well formed.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Thanks Christian for your reply.
There are two classes XMLTextWriter and XMLDocument class. Which one is better ?
I am bit lost at the moment. I will tell you exactly what i am trying to do.
Basically in the webpage, there are various dropdown box and checkbox whose values are retrieved from the databasse. Till this part it's all working fine.
Now when user select the item and check relevant checkboxes, there is a button to generate xml.
The xml should look like:
user>
accountdetails>
useraccounts crit="0">
useraccount>
accountstatus id="1" />
/useraccount>
/useraccounts>
addresses>
address>
countries crit="0">
country id="123" />
/countries>
/address>
/addresses>
p.s. it was not displaying my xml code, so i removed "<" from every line.
The account Details is just a one subelement of user root element. There are many elements. And these all element should only exist in the xml if user select it.
So what should be my next move. Can you show me a syntax for one section. And is it possible to retrieve the value of the selected item.
Like where it says accountstatus id="1" />, can i write something like this - (dropdownbox1.selectedItem)
Thank you
|
|
|
|
|
Hi I have written one javascript function to create messagebox using div. The script is given below.
function showBox(str)
{
debugger;
var width = document.documentElement.clientWidth + document.documentElement.scrollLeft;
var layer = document.createElement('div');
layer.style.zIndex = 2;
layer.id = 'layer';
layer.style.position = 'absolute';
layer.style.top = '0px';
layer.style.left = '0px';
layer.style.height = document.documentElement.scrollHeight + 'px';
layer.style.width = width + 'px';
layer.style.backgroundColor = 'LightGray';
layer.style.opacity = '.7';
layer.style.filter += ("progid:DXImageTransform.Microsoft.Alpha(opacity=80)");
document.body.appendChild(layer);
var div = document.createElement('div');
div.style.zIndex = 3;
div.id = 'box';
div.style.position = (navigator.userAgent.indexOf('MSIE 6') > -1) ? 'absolute' : 'fixed';
//div.style.border==" "
div.style.top = '200px';
div.style.left = (width / 2) - (400 / 2) + 'px';
div.style.height = '100px';
div.style.width = '400px';
div.style.backgroundColor = 'White';
div.style.border = '4px solid silver';
div.style.padding = '20px';
document.body.appendChild(div);
var myimg = document.createElement('IMG');
myimg.src= "../images3.jpg";
myimg.width= '50';
myimg.height = '50';
myimg.visible="true";
div.appendChild(myimg);
var p = document.createElement('p');
p.innerHTML = str;
p.style.position = "absolute";
p.style.top = '20px';
p.style.fontSize=14+'px';
p.style.fontWeight = "bold";
p.style.left = (width / 2) - (800 / 2) + 'px';
div.appendChild(p);
var btn=document.createElement('Button');
btn.innerHTML='Ok';
btn.style.border='2px solid silver';
btn.style.opacity = '.6';
btn.style.fontSize=16+'px';
btn.style.fontWeight = "bold";
btn.style.border='solid';
btn.style.position = "absolute";
btn.style.top = '100px';
btn.style.left = (width / 2) - (620 / 2) + 'px';
btn.onclick = function()
{
document.body.removeChild(document.getElementById('layer'));
document.body.removeChild(document.getElementById('box'));
};
div.appendChild(btn);
}
I dont have any problem in this script. The only problem i have is , I am unable to apply image of round corner to the border of that message box.
Does anybody has solution for my problem. How can i do this.
Thank You in advance.
.
|
|
|
|
|
The obvious issue is, for you to have a rounded corner, the bit that's meant to be rounded off, needs to look the same as the form underneath. Unless you're able to use PNGs and the browser respects their transparency, I don't see how this could work.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Apply PNG file to set corner rounded
|
|
|
|
|
i cant access data grid dynamically..........
|
|
|
|
|
refernce to web guide............
|
|
|
|
|
Perhaps you need to find a support group for people who have the same issue as you.
Seriously, what the hell are you talking about ? How about showing us some code, and explaining what you mean ? If you offered me a million dollars to help, I would give it a shot, but it would be a lot of work to try to cover every possible thing you meant, and you still might find my reply useless, even with that sort of incentive. No-one is going to try to seriously help you for free, based on this half cocked attempt at a question.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Hi,
I am working on generating reports for one of the data entry project using ASP.NET. Data Entry Project has huge data which runs in lakhs. When i load these 1 lakh data in reports it takes much time to load and consume more memory. Is there any faster way to load huge data on reports. Which type of reports is good to handle this type of huge data. Like(Creating reports using Crystal Report/ Infragistic Controls /....).
Need a suggesstion soon, as i need to start working on this as soon as possible.
Thanks & Regards,
Rashmi.M.K
|
|
|
|
|
lakh is not an english word, I only know what it means because it's used here so often.
There's no other answer. Lots of data takes longer than less data. It's possible that you're doing calculations you could cache, etc, but with the info you've given, the answer is that it's impossible to say, but any way of doing it faster involves a faster PC, or some sort of shortcut.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Does this mean, "A lakh (Hindi: लाख) (also written lac) is a unit in the Indian numbering system equal to one hundred thousand (100,000; 105)" ?
My only suggestion would be to develop an asynchronous reporting architecture where a background process creates the report and notifies the user when the report is complete. Something like a "Report Sever".
|
|
|
|
|
yes it is .. n lac is an english term but not used outside india i reckon.
|
|
|
|
|
Large data always causes performance headache. You can use SQL Server Reporting Services and may concentrate to optimize the process to pick and bind data (I am talking about SQL Queries).
Either you love IT or leave IT...
|
|
|
|
|
thanks for all who has replyed...
saanj, i think this is the option where i can see the possibility.
thanks for ur suggestion.
Rashmi.M.K
|
|
|
|
|
Yes you may start with SSRS. All the best.
Either you love IT or leave IT...
|
|
|
|
|
Hi friends, I want to pass the data to javascript function when click on the button. I write the code like this.
<asp:button id="Button1" runat="server" onmousedown="del(document.getElementById('TextBox1.Text'))" xmlns:asp="#unknown">
Text="Button" />
In java script function
function del(txt)
{
document.Write(txt);
}
But the answer came as NULL
Can anyone correct it?
|
|
|
|
|
<asp:button id="Button1" runat="server" onmousedown="del(document.getElementById('<%=TextBox1.ClientID%>'))">
The issue is that TextBox1, is not called TextBox1 on the client.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Ok. I solve it. Is it possible to pass session variable inside the function?
|
|
|
|
|
The session variable is on the server, you'd have to pass it to javascript by writing some script that defines a client side variable and sets it to the server side value. Don't forget to put it in quotes if it is a string.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Can u give the syntax for converion please?
|
|
|
|
|
var myClientsideString = '<=Session["key"]>';
inside a script block, obviously.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Karthick_gc wrote: Is it possible to pass session variable inside the function?
if it is already in session, then what is the use of pass it?
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
I want to check the session variable when the form is unload. I write the code like this.
function del()
{
alert(Session["nam"]);
}
But the unload event is not trigerring. Whats the fault in this code?
|
|
|
|
|
Erm, I think you have to pass the TextBox1's value, surely, and not the whole control?
I might be wrong, but that's what i gathered from the del(txt)function.
var question = (_2b || !(_2b));
|
|
|
|
|
onmousedown="del(this.text)"
|
|
|
|