|
Please check-out this link below..
http://www.codeproject.com/aspnet/ChkBoxInGrid.asp[^]
but one thing... The author used a checkedbox (at the top) to select/deselect all checkedboxs in this article.. So, you should probably change this checkedbox to button...
Hope it helps..
|
|
|
|
|
Make it more explainatory what exactly you have and what you want.
Based on what I could understand I can say create a button at runtime and add that string to innerHTML property of form.You can call a function on click event of that button
Button_Click = "javascript:FuncationName();" loop through all the checkboxes and make desired changes.
If you can elaborate requirement properly I can be more specific.
"""" Before hanker after an answer understand the question """""
|
|
|
|
|
Hello Everyone,
I have posted this problem on more than 2 to 3 forums . But sadly no body answered it. Hope, I will get an answer, atleast one reply from this forum.
The problem is regarding encoding of file name to be displayed on the Save / Open dialog , while downloading file.
Here is my download code. ( in ASP.NET 2.0 C# VS2005 )
Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition", "attachment;filename=" + fileName + ".pdf");
Response.BinaryWrite(fileData);
Response.End();
Where fileData is binary Array and fileName is name of file. Now for "English" file name , there is no problem of encoding. File Name is displayed properly on File Save / Open dialog , while downloading. But , when file Name is in "Japanese" , some encoding problem arises. File Name is shown in wrong japanese / garbage characters.
I receive this fileName from database, which is in UTF-8 encoding. Even this Japanese fileName is displayed properly on screen, in a listing which shows fileName and their size. For Screen , encoding is set to UTF-8.
To tackel this problem, I tried by setting Response.Charset = "SHIFT-JIS", but still then problem persists.
Pls can u help me? I Don't know how to set encoding in Response.AddHeader( ) while showing fileName.
Please answer this one.
|
|
|
|
|
Honestly, I don't have so much idea about Japanese character... but i wanna give you some suggestions....
What about this code??
Response.ContentType = "application/pdf";<br />
Response.AddHeader("content-disposition", "attachment;filename=" + HttpUtility.UrlEncode(fileName) + ".pdf");<br />
Encoding encoding = Encoding.GetEncoding("Shift-JIS");<br />
Response.BinaryWrite(encoding.GetBytes(fileData));<br />
Response.End()
|
|
|
|
|
Hi,this is my code.how to use OR condition in c# code,this code is not working.i want to check the selected image extension.if the extension .jpg or .bmp then it is going to this condition code.what is wrong in that.
if (System.IO.Path.GetExtension(cmdBrowse.FileName).ToLower() != ".jpg" | System.IO.Path.GetExtension(cmdBrowse.FileName).ToLower() != ".bmp")
|
|
|
|
|
Try || ..
e.g.
if (System.IO.Path.GetExtension(cmdBrowse.FileName).ToLower() != ".jpg" || System.IO.Path.GetExtension(cmdBrowse.FileName).ToLower() != ".bmp")
|
|
|
|
|
Either || or | will work (although the non-short-circuiting single pipe is an odd choice here since it's more commonly used for bitwise or).
Are you sure you don't want to test for equality rather than inequality?
string lower = System.IO.Path.GetExtension(cmdBrowse.FileName).ToLower();
if (lower == ".jpg" || lower == ".bmp")
David Anton
http://www.tangiblesoftwaresolutions.com
C++ to C# Converter
C++ to VB Converter
C++ to Java Converter
C++ to C++/CLI Converter
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: converts C# to C++/CLI and VB to C++/CLI
|
|
|
|
|
I think u have to put 2 piping(||)characters in ur code
It's like this..
if ((System.IO.Path.GetExtension(cmdBrowse.FileName).ToLower() != ".jpg") ||(System.IO.Path.GetExtension(cmdBrowse.FileName).ToLower() != ".bmp"))
try this once...
|
|
|
|
|
i made my web setup file
and worked well.
and now the database how can i Attach it -or restore it-what if the user doesnt have SQL i added sql express edition as prerequsities.
|
|
|
|
|
I have to mail a file as attachment which is on other server
How to access that file
Gaurav
|
|
|
|
|
try using the UNC path as such: \\Servername\foldername\filename.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
"There is no wealth like knowledge, no poverty like ignorance." Ali ibn Abi Talib
"Animadvertistine, ubicumque stes, fumum recta in faciem ferri?"
|
|
|
|
|
Hi,
I have an aspx app which needs to post data to a form and read the response.
i try to use "webClient" and "HttpWebRequest" classes, but can not get response ?
can you help me and get a refrence?
please
|
|
|
|
|
function xmlhttpPost(strURL) {<br />
var xmlHttpReq = false;<br />
var self = this;<br />
if (window.XMLHttpRequest) {<br />
self.xmlHttpReq = new XMLHttpRequest();<br />
}<br />
else if (window.ActiveXObject) {<br />
self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");<br />
}<br />
self.xmlHttpReq.open('POST', strURL, true);<br />
self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');<br />
self.xmlHttpReq.onreadystatechange = function() {<br />
if (self.xmlHttpReq.readyState == 4) {<br />
updatepage(self.xmlHttpReq.responseText);<br />
}<br />
}<br />
self.xmlHttpReq.send(getquerystring());<br />
}<br />
<br />
function getquerystring() {<br />
var form = document.forms['f1'];<br />
var word = form.word.value;<br />
qstr = 'w=' + escape(word);
return qstr;<br />
}
------------------------------------------------------
This is for posting....
self.xmlHttpReq.send(getquerystring());
This is for getting the response....
self.xmlHttpReq.responseText
|
|
|
|
|
hi : Michael Sync
tank you .
your answer is with javaScript.
can you get me an example with C# or VB.NET ?
|
|
|
|
|
Have you read Bassam Saoud's post?? maybe.. this is what you want..
|
|
|
|
|
you want to post data from an ASP.NET application to a form in another ASP.NET application ?
Anyways to post data from a web form to another you can Add PostBackUrl="<YOUR_FORM_Path>" property to the submit button or use Server.Transfer and set the preserveForm parameter to True (for example Server.Transfer("<YOUR_FORM_Path>", True) )
Now to read post data you can use Request.Forms("<your_controlid>") to access value for a specific control
Hope this helps.
|
|
|
|
|
|
HttpWebRequest hReq = (HttpWebRequest)HttpWebRequest.Create(ReqUrl);
HttpWebResponse hResp = (HttpWebResponse)hReq.GetResponse();
Stream str = hResp.GetResponseStream();
Can you be more specific about your problem??????
|
|
|
|
|
|
hi,
can anybody tell how i can use
sesssion in window applications
(syntax)
thnks
Afreen
|
|
|
|
|
afreen taj wrote: can anybody tell how i can use sesssion in window applications
There is no "Session" object in windows application..
Why do we want to use "Session" in Windows Application???
|
|
|
|
|
|
Hi all,
I am studying on using google maps to integrate into my web application..my need is to show "Get directions", search nearby and Save to my maps on a marker..
Thanks,
<< >>
|
|
|
|
|
I have the following code in my global.asax file. The reasons I create a page object and pass it is because my error reporting code requires a page object which it then uses parts of to build the report. Now obviously this method provides no page details. Is it possible to get the last page viewed and send that instead of a NULL page.
Otherwise is it possible to send some form of machine specific information via my error report. The error report code lies in a seperate vb file.
Thanks in advance
' Code that runs when an unhandled error occurs<br />
Dim ex As Exception = Server.GetLastError<br />
Dim page As Page = Nothing<br />
<br />
Emailer.ErrorEmail(ex, page)<br />
<br />
Server.Transfer("~/Error_Page.aspx", False)
|
|
|
|
|
HI, I used timer control in my page.
each 10 second i show one of some pics in my page by timer control.
problem is here, when i am scrolling in my page, when pic change, page scroll to top of page (my images change in top of page).
any one has Idea about it?
|
|
|
|