|
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">
▒▒〓▒〓▒▒
▒〓〓〓〓〓▒
▒▒〓▒〓▒▒
▒〓〓〓〓〓▒
▒▒〓▒〓▒▒
|
|
|
|
|
Hi my dears,
I have a website in asp.net 2.0 and C#.
My website has several subdomains and in each subdomain I have a master file with several content files, then I created subdomains in my Control Panel and then created directories in wwwroot. Now when I visit www.mySite.com/subDomain1/ anything is OK! but when I visit subDomain1.mySite.com an error occures :
Runtime Error <br />
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine. <br />
<br />
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".<br />
<br />
my web.config file contents is :
< configuration ><br />
< appSettings /><br />
< connectionStrings ><br />
< add name="ConStr" connectionString="myConnectionString" >< /add ><br />
< /connectionStrings ><br />
< system.web ><br />
< customErrors mode="Off" /><br />
< sessionState mode="InProc" timeout="30"/><br />
< httpRuntime executionTimeout="90" useFullyQualifiedRedirectUrl="false" minFreeThreads="8" minLocalRequestFreeThreads="4" appRequestQueueLimit="100"/><br />
< anonymousIdentification enabled="true" cookieName=".ASPXANONYMOUS" cookieTimeout="43200" cookiePath="/" cookieRequireSSL="false" cookieSlidingExpiration="true" cookieProtection="All" cookieless="UseCookies"/><br />
< compilation debug="true"><br />
< assemblies><br />
< add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/><br />
< add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/><br />
<br />
<br />
< authentication mode="Windows"/><br />
<br />
<br />
<br />
Should I define somethings about subDomains in web.config?<br />
Or is the problem because of master files in each subdomain?<br />
What should I do, <br />
thx for your helps!<br />
<br />
<br />
<br />
<br />
<div class="ForumSig">www.behzadi.net</div>
|
|
|
|
|
A subdomain is a separate web aplication. It has to have it's own web.config file.
---
single minded; short sighted; long gone;
|
|
|
|