|
|
Private Function CreateXmlFileUser(ByVal objDs As DataSet) As String
' Create a file name to write to.
Dim filename As String = "myXmlUsers.xml"
' Create the FileStream to write with.
Dim myFileStream As New System.IO.FileStream(filename, System.IO.FileMode.Create)
' Create an XmlTextWriter with the fileStream.
Dim myXmlWriter As New System.Xml.XmlTextWriter(myFileStream, System.Text.Encoding.Unicode)
' Write to the file with the WriteXml method.
objDs.WriteXml(myXmlWriter, XmlWriteMode.WriteSchema)
myXmlWriter.Close()
Return filename
End Function
i this is very useful for you...!
Enjoy
Pavan Pareta
|
|
|
|
|
I'm finding it surprisingly hard to determine if session state has been deactivated on a page through code behind. Just referring to Page.Session throws an exception if it's turned off on that page (i.e. if(Page.Session!=null) throws an exception ) which as we all know is a very bad thing indeed.
Is there a reliable non exception generating way to check if a page has session disabled?
|
|
|
|
|
Found it:
If you check Context.Session for null it won't throw an exception and is reliable indicator of session enablement status.
|
|
|
|
|
I have a gridview that I'm correctly binding correctly, but I can't seem to get the formatting of a datetime column correct and was hoping I could get some advice on what I'm doing wrong.
The column, I have defined as
<asp:BoundField DataField="ClosedDate" DataFormatString="{0:MM/dd/yyyy}" HeaderText="Date Added" />
I originally had DataFormatString="MM/dd/yyyy", but that literally displayed just that, so the {} part helped. Now, however, it displays the time in addition to the date, which is something I don't want. Is there some trick with the number before, or the specific formatting that I'm using that is making it display the full datetime?
|
|
|
|
|
Hi there,
You simply set the BoundField.HtmlEncode Property [^] to false as this property has the true value by default and this causes the formatting not to work.
|
|
|
|
|
Worked perfectly, thanks.
|
|
|
|
|
Haii,
I need a help regarding making the servercontrols masked based on the input given selected before.
for example, if i select a value from radio button for choice then based on that choice some webcontrols should be masked (eg text boxes concerned on that choice)on the form during selection(runtime).
Please help me out with this..
Thank you for the reply to my previous question.
veerendra
|
|
|
|
|
|
I have a userControl, at run time i fill a table with 5 user controls,
when i creating instances as artical about creating user control instances[^]
I added handler of user control event to a function, but when i raise event ( for example clicking a button in User Control) , there is nothing, the function is not executed.
2. question is that i fulfill panel with UC s but when i click any button on Form (not exactly button on UC) to post the page , after posting back, i see panel has no UC .
|
|
|
|
|
Check event bubbling:
http://aspnet.4guysfromrolla.com/articles/051105-1.aspx
|
|
|
|
|
Hi all,
I put N control in a page, then I want get these controls in c# code,
so I wrote:
<br />
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
foreach (Control ctrl in this.Controls)<br />
{<br />
Response.Write(ctrl.ToString() + "<br>");<br />
}<br />
}
But this doesn't write all controls on the page. so how to do it?
Thanks.
|
|
|
|
|
You should also check for child controls of each control.
|
|
|
|
|
oh, yes, I got all controls in the page. Thanks very very much.
|
|
|
|
|
You're welcome.
It's refreshing to have someone write back saying "thank you". It doesn't hapen often.
|
|
|
|
|
|
Can i raise any event using Required field validator without posting it back to the server
Thanx in Advance
|
|
|
|
|
Client side Validators are simply javascript. You can raise your even there.
|
|
|
|
|
Hi all,
I extract the project from VSS named "PDFConverterService" in to folder "c:\data\VSS\PDFConverterService".i created a virtual directory in IIS named "PDFConverterService" and the directory path is pointing to "c:\data\vss\PDFConverterService". When i try to open the solution from
"c:\data\vss\PDFConverterService" it shows the error message as below.
Select the location for the working copy of your web projects.You can either accept the default location or change it by clicking in the cell and editing it. The visual studio solution will be located at c:\data\VSS\PDFConverterService as specified in the previous dialog box.
Project Name : PDFConverterService
SourceControlServerLocation:$/
Enter Working Copy Location Here : http://localhost/PDFConverterService_1
Thanks for your help,
Suresh.P.S
|
|
|
|
|
You've either tried to open it straight to a web folder, or you already have a web folder with the name PDFConverterService.
|
|
|
|
|
hi guys, [ASP.Net VB.Net]
i'm having a datagrid binded with value at page load Event,
the datagrid has three sets of records combined together,
initially i show all the records
i placed three buttons for these threee types of Records
based on the user choice the records has to be filtered and shown in the grid.
[For Example, Take Exam Result of a Class]
initially i'll show all the student's result at page load event,
my three buttons, Total , Pass and Fail,
when the user clicks on Pass the grid has to show only the passed student,
similarly for Fail button and Total,]
Actually i want this to be done at client side,
whether i want to store the datagrid value in session and give to the datagrid or i have to use some other datasource,
could any one plz help me
Thanks you guys
|
|
|
|
|
You can try using the Filter, but I believe it requires a postback.
|
|
|
|
|
how can i fill listbox by 3 tire architure
|
|
|
|
|
Bind it to your business object.
|
|
|
|
|
Hi everyone
Will you please guide me to learn asp.net and c#.net
what is the basic thing i have to do and how can learn lot in small time.
please guide me.
i know Vb.6 and java .
nato
|
|
|
|