|
Hi,
Can we store objects such as Oledbconnection in web.config ? If we can do,then how can we do?
Thanks...
Regards...
|
|
|
|
|
atarikg wrote: Can we store objects such as Oledbconnection in web.config ?
You can store the connection string in the config.
|
|
|
|
|
so there is no way to store objects in web.config right ?
|
|
|
|
|
atarikg wrote: so there is no way to store objects in web.config right ?
You could serialise an object to XML, which you could then store in the config file. But it isn't designed for that.
My advice is to store the connection string in the config file.
|
|
|
|
|
Or U can use binary serialization and store it in another file.
Regards,
Arun Kumar.A
|
|
|
|
|
thank you so much
|
|
|
|
|
I've converted http://www.codeproject.com/Ajax/logclientsidejserrors2srv.asp[^] into
string input=new StreamReader(HttpContext.Current.Request.InputStream).ReadToEnd();
... some processing
HttpContext.Current.Response.ContentType="text/plain";
StreamWriter output=new StreamWriter(HttpContext.Current.Response.OutputStream,new System.Text.UTF8Encoding());
output.Write(... returning info);
output.Flush();
output.Close();
My question is what am I missing that would complete the Ajax cycle and return text back to the calling page?
Scott Rider
www.scottrider.com
|
|
|
|
|
I would just set the response type and use Response.Write. Not sure if this should work or not.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Like this?
string input=new StreamReader(HttpContext.Current.Request.InputStream).ReadToEnd();
write_log(input);
HttpContext.Current.Response.ContentType="text/plain";
Response.Write("hello");
Scott Rider
www.scottrider.com
|
|
|
|
|
yeah.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Same thing.
Scott Rider
www.scottrider.com
|
|
|
|
|
how check the checkboxes in checkboxlist items when retriving the data from back end to front end in asp.net using c#.net
dfd
|
|
|
|
|
If I get your question you can do it in the DataBound event of CheckBoxList .
Mazy
"This chancy chancy chancy world."
|
|
|
|
|
Hi All,
How to create the crystal report in ASP.NET with c#(Web Application).
Plz give me the steps to create it in an easy way
|
|
|
|
|
Search Crystal Report in search bar of code project and you will find some articles.
Mazy
"This chancy chancy chancy world."
|
|
|
|
|
Hi all,
I want to open a readme txt file when user clicks a button. How do i achieve this. Thanks in advance.
|
|
|
|
|
Open read me file in client?I don't think there is anyway without use component.Use reponse to write it in a aspx page.
StreamReader rdrTextFile=new StreamReader(txtFilePth);
string strContent=rdrTextFile.ReadToEnd();//strContent is the content of the txt file.
//response strContent
rdrTextFile.Close();
|
|
|
|
|
Hi sir,I'm sorry.I think I didn't understand your demand.
(1) Set Response's ContentType to "APPLICATION/OCTET-STREAM";
(2) Add a header like: response.AddHeader("Content-Disposition","attachment;filename="+strFileName);//just change the fileName to your real file name.
(3)Get a buffer array(use FileStream to get a byte[]);
(4)Clear the response;
(5)Use Response.OutputStream.Write write the byte array to client.
(6)Call Response.End(),otherwise you will see the html of current page in the text file.
|
|
|
|
|
Sorry for not being clear.
I don`t wan`t to read or write to a file!!!. All i need to do is open or download up a notepad file on the client`s machine stored on the server as soon as the user clicks on the help button.I know that i can use a hyperlink set it`s href value to the file but how do i do this on a button click. Or just tell me how do i fire onclick event of that hyperlink on a button click.
|
|
|
|
|
---
Or just tell me how do i fire onclick event of that hyperlink on a button click.
----
Give you a example,I can fire it but cannot show a download dialog box.
Create a and hidden it.Then use a javascript function to fire the event. You must give a id for .
function fnDownLoadFile()
{
window.document.getElementById("hello").click();
}
|
|
|
|
|
Very Simple ... Just put
Response.Redirect("C:\Abc.txt");
in the Button_Click() function in the aspx.cs file !
"We all have abilities.The difference is how we use it."
|
|
|
|
|
How to split one record into two rows in datagrid?
|
|
|
|
|
Change your Column to ItemTemplate and then you put any number of control in any kind in it.So you search for it google to find the answer.
Mazy
"This chancy chancy chancy world."
|
|
|
|
|
Hi All,
Can anybody tell me how all of the checkboxes get selected or checked as top-most checkbox is checked
|
|
|
|
|
Are the chekboxes belongs to a datagrid?
If yes,notice the ids of the checkboxes in html.Then write a javascript function to modify all the checkboxes.
Just like this:
for(int i=0;i<window.document.frm.length;i++)
{
var="" chk="document.getElementById("dgd_"+i+"chk");
" if(chk!="null)
" {
="" chk.check="true;
" }
}=""
<div="" class="ForumSig">
▒▒〓▒〓▒▒
▒〓〓〓〓〓▒
▒▒〓▒〓▒▒
▒〓〓〓〓〓▒
▒▒〓▒〓▒▒
|
|
|
|