15,913,944 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Franco Cipriano (Top 43 by date)
Franco Cipriano
10-Sep-14 3:16am
View
Yup, this is where I got this code. When I copy it to my system. It does not even execute the click event. So I added the download attribute in the anchor tag.
Franco Cipriano
25-Jul-13 9:23am
View
Thanks,
what's the variable deg and file?
Franco Cipriano
23-May-13 2:43am
View
I call the jquery from code behind since I need to execute a script after opening the jquery. I tried calling the jquery from javascript but it closes right away
function openDialog(divname) {
$('#' + divname).dialog({
width: 400,height: 300,
open:function() {$(this).parent().appendTo("form:first");}
});
return true;
}
Franco Cipriano
18-Apr-13 11:18am
View
My files are located in C:\ of my server
Franco Cipriano
18-Apr-13 8:17am
View
My files are located in a different server..what should be the url format? http://<ipaddress>//folder_path ... is that the format? thanks
Franco Cipriano
18-Apr-13 4:06am
View
Hi,
This is more like the same as what I have on my code. Will the url be a string?or a URI object?also does the filePath require a filename?
Franco Cipriano
19-Mar-13 9:30am
View
Hi,
I tried this code:
Response.Clear();
Response.Buffer = true;
Response.AddHeader("content-disposition",
"attachment;filename=GridViewExport.xls");
Response.Charset = "";
Response.ContentType = "application/vnd.ms-excel";
StringWriter sw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(sw);
grdExcel.AllowPaging = false;
grdExcel.DataBind();
grdExcel.RenderControl(hw);
Response.Write(sw.ToString());
Response.End();
and also I followed the instruction about extension hardening. see this article: http://blogs.msdn.com/b/vsofficedeveloper/archive/2008/03/11/excel-2007-extension-warning.aspx
..now the files can open and it does not give me an error..the problem now is that it did not populate the rows and column that are in the gridview, it's basically just a blank worksheet
Franco Cipriano
19-Mar-13 9:08am
View
Hi,
I am concerned that this solution might not work for multithreading since it does the saving on the server size and not client..(pls correct me if im wrong).
Thanks
Franco Cipriano
19-Mar-13 8:13am
View
Hi,
I followed the solution and it still gives me a corrupted file
Franco Cipriano
19-Mar-13 8:13am
View
Hi,
I still get a corrupted file
Franco Cipriano
12-Mar-13 8:02am
View
it seems that the path is recognized as a server path not a client path. I tried just putting C:\ and it saved it on the C:\ of the server not on my local machines C:\
Franco Cipriano
8-Feb-13 8:23am
View
I try to deploy it on a remote server. Yes, it runs in IIS, I also have control over it via remote desktop.
Franco Cipriano
3-Dec-12 9:47am
View
Thanks,
I do not have problem reading the contents of the excel file. My problem is using filestream to copy the excel file from a different path to another path
Franco Cipriano
11-Oct-12 10:17am
View
Just an update on my problem..i tried to replicate this on an ordinary web form and not a master content page and the javascript works..im not sure why it does not work with master content pages
Franco Cipriano
10-Oct-12 13:05pm
View
i got another example from this link http://sorin.serbans.net/blog/index.php/2008/03/19/windowopen-and-passing-values-between-browser-windows/
I revised it and this is how it looked like on my code:
Parent:
function openChildWindow(tagetControlId) {
var s = "BrowseDirectory.aspx?id=" +tagetControlId;
window.open(s,'', 'width=400,height=600,status=no,toolbar=yes,menubar=no,location=no');
return false;
}
Child:
function Done() {
p = window.opener.document; //parent window
alert(window.opener);
target = p.getElementById(GetElementFromQuery(location.search.substring(1), 'id'));
alert('1 ' + target);
target.value = document.getElementById('browseTextBox').value;
alert('2 ' + target.value);
window.close();
}
function GetElementFromQuery(url, name) {
x = url.split("&"); for (i = 0; i < x.length; i++) {
if (x[i].split("=")[0] == name) {
return x[i].split("=")[1];
}
}
return "";
}
I am getting a null on target..but on the example it shows an object..
I tried the example and it worked..but it did not work on my web app..I am calling the child page from a master content page..the examples are 2 not master content pages..does it matter?
Thanks,
Franco Cipriano
10-Oct-12 9:43am
View
How do I know if the URL is from the same domain? the child window is opened by calling window.open from the parent page..and the alert does not show up
Franco Cipriano
4-Oct-12 11:38am
View
is there a way to have it go back to the client side and then proceed to server side code?
thanks,
Franco Cipriano
3-Oct-12 11:56am
View
When doing some more debugging i found out something on the the code..instead of popping up a dialog box when the code passes on the clientscript line..what it does is passes on the clientscript block, and continue until the function is done and pops up a dialog box..am I doing something wrong in the code?
Thanks,
Franco Cipriano
1-Oct-12 13:24pm
View
i used ClientScriptManager.RegisterClientScriptBlock (Type typeofscript, String key, String script, true)..to initialize a javascript alert dialog box and it worked..im not sure why it does not let the confirm box pop-up..
Franco Cipriano
1-Oct-12 12:44pm
View
Yes, that's why I put it on the codebehind since I need to have a dialog box that will pop-up and let the user know if they want to continue of not.
Thanks!
Franco Cipriano
1-Oct-12 11:36am
View
The line before the variable declaration of DiagResult calls the ConfirmBox() where I can assign the value of the inpHide through the javascript function. But in this case, the ConfirmBox() does not execute..but when I put the ConfirmBox() function on the onClientClick event of the button it pops-up..any idea??
thanks,
Franco Cipriano
14-Sep-12 10:07am
View
I am calling it from the class file that I added in the project, not the class file from the .aspx .. In the .cs file I do not have an option to call the ClientScript.RegisterClientScriptBlock
Franco Cipriano
13-Sep-12 8:01am
View
Hi,
Thanks, but this article only states how to call javascript from code-behind (aspx.cs) file. I am looking for a way on how to call a javascript from .cs file.
Thanks,
Franco Cipriano
15-Aug-12 16:31pm
View
So i should assign a variable to catch the window.open()?
Franco Cipriano
14-Aug-12 16:11pm
View
Hi,
Thanks for the tip. I was able to solve my problem, by creating a function in the Class instead of the page and have the class called by the page. The page passes the control that needs to be evaluated as parameter to the GetQuarters() function.
Thanks,
Franco Cipriano
14-Aug-12 11:18am
View
Hi,
I am not sure if I can put the function call of GetQuarter() on Page_Load since the GetQuarter() function is called on an onClick event.
Thanks,
Franco Cipriano
14-Aug-12 11:11am
View
sorry..i got it wrong it should be Default() not _default..
Franco Cipriano
10-Aug-12 15:57pm
View
Hi,
I made a change on my returning function. Here is the code:
function SendValueToParent() {
var myVal = document.getElementById('_browseTextBox').value;
alert("Im here");
window.opener.document.getElementById('<%= txtRaw.ClientID %>');
window.close();
return false;
}
txtRaw is a control on the parent page.. am i doing it right?
thanks,
Franco Cipriano
9-Aug-12 16:39pm
View
hi,
here is the code..I think I got the one above wrong
function SelectAndClose()
{
txtValue = document.getElementById('_browseTextBox');
if ((window.opener != null) && (window.opener && !window.opener.closed))
{
window.opener.InvokeParent(txtValue.value);
}
window.close();
return txtValue;
}
Franco Cipriano
9-Aug-12 16:38pm
View
Hi,
Yes I do have an asp control: <asp:TextBox ID="_browseTextBox" runat="server">..
Franco Cipriano
9-Aug-12 8:55am
View
Hi,
I tried doing that but it gives me an error object not set to an instance. I declared a new instance for the class with the control as it's member.
Thanks,
Franco Cipriano
8-Aug-12 16:28pm
View
I was wrong it did not give me the text value I need, it still give NULL value.
Franco Cipriano
8-Aug-12 16:20pm
View
I was able to make the control public by declaring it public from the aspx.designer page.this got what I need, but will still try the previous approach I was thinking of
Franco Cipriano
8-Aug-12 16:16pm
View
Im accessing this public function from a class, I can't access the controls from another class so I made a public class from form1 that will access the controls from form1 so that I can use it at the Class that I created.
Thanks
Franco Cipriano
25-Jul-12 14:47pm
View
Deleted
here is my aspx.cs code:
protected void trSubInd_SelectedNodeChanged(object sender, EventArgs e)
{
foreach (TreeNode node in trSubInd.CheckedNodes)//loops on the checked nodes
{
if (trSubInd.SelectedNode.ChildNodes.Count != 0)//if selected node is parent. Node has children nodes
{
IndID.Add(node.Value.ToString());
}
else
{
if(!SubIndID.Contains(node.Value.ToString()))
{
SubIndID.Add(node.Value.ToString());
}
}
}
}
Here is my aspx code:
<asp:TreeView ID="trSubInd" Runat="server" Width="159px" Height="177px"
OnSelectedNodeChanged="trSubInd_SelectedNodeChanged">
Franco Cipriano
25-Jul-12 8:33am
View
Hi,
It will be used by other web pages, so there are other control IDs that will used the value returned by the function..
Franco Cipriano
24-Jul-12 16:24pm
View
I don't know how to get the return value from the function..I also tried to use Session in passing the value, but still it won't work.
Franco Cipriano
20-Jul-12 5:46am
View
do I need to declare 'selectedNode' as TreeNode? sorry, im quite new with asp.net c#..
thanks,
Franco Cipriano
17-Jul-12 10:43am
View
...i think i got the answer :)
varID = myListbox.SelectedItem.Value.ToString();
Franco Cipriano
17-Jul-12 10:36am
View
Thanks for the clarification..just a follow up question on this..now that I binded the data to the listbox, it now shows the Emp_name on the list box. Now, when I select the Emp_name and press the button Select, I want to store the Emp_id in a variable..but what it gives me is still the Emp_name and not the Emp_id..i have this in code:
varID = myListbox.SelectedItem.Text;
Franco Cipriano
11-Jul-12 15:08pm
View
Hi,
I currently have that setup, the connection to the DB is within the (!IsPostback) bracket.btw, I have a master page and I navigate through a MenuItem, which points to different MasterPage contents.
Thanks,
Franco Cipriano
9-Jul-12 14:46pm
View
so how do i count the number of rows in the gridview from a separate JS file?
Franco Cipriano
13-Sep-11 19:13pm
View
its in this line Dim myChart As Excel.ChartObject = WB.Charts(1)
Thanks,
Show More