|
In the code behind ? You can't. You have to put a server control inside there, for example, a placeholder or a literal.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
If the DIV tag is set to run server-side, it can be referenced in the code-behind as an instance of a HtmlGenericControl class. I'm not sure how the OP intends to populate it though.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
hi,
i am making a website where i want to embed microsoft word program into it, does anyone have any suggestions how i can do this?
also, i want to make the microsoft word document event driven, for example, when the user clicks file, print, the website/program will recognise this and respsond by printing a line saying "thats correct". is there a way of doing this as i dont have the code of microsft word, so i need to do it myself. can someone please let me know if this is possible or do i have to make my own word processing program.
thanks
|
|
|
|
|
Hi,
I am using ASP.NET 2.0. I have a panel control on my page and I want to add a div to it at runtime. How do I do this. I also want to set the class property of the div at runtime accordingly.
Thanks
Brendan
|
|
|
|
|
Put a literal inside the panel, and then set it to be the div, with the class property, in your code behind.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Friends,
My cookies value gets reset between every two or three redirect between pages. The cookie value does not reset in mozilla or some version of IEs.
So the problem is not with the code. I have checked everything in IE options also . Wat might be the problem?
|
|
|
|
|
Can you show us your code? I think that it might be the cookie "path" problem..
|
|
|
|
|
Actually i have to design a form in which there is a row and an insert button. It should perform as such that on clicking of the insert button a second row should get created.How to do that in jsp
skd
|
|
|
|
|
|
hi,
I am trying to use AJAX for my two dropdown lists for my project using ASP.NET. On selecting an item in one dropdown(say dropdown1), the items for other dropdown(say dropdown2) should populate. Dropdown1 items are retrived from database using C#. My question is I need the selected item value of dropdown1. If I use dropdown1.SelectedItem.Value in C# side means error occurs. I need the selected item value.How can I get it using either javascript or C#.
Just now I am populating all the items in dropdown2. But I need the selected item value of dropdown1, so that I can able to filter and populate items in dropdown2 corresponding to dropdown1 item.
Can anyone help me. Please..........
Arun
|
|
|
|
|
|
Thanks. I have searched in Google first and also posted here. Its working fine.
I found that to get the value we can also use
document.getElementById('<%=ddlTraining.ClientID%>').value;
Its also returning the selected item value.
Thanks for ur help and I need it.
Thanks & Regards
Arun
|
|
|
|
|
hi all
i have some code check popup open but have some problem
in the fist link will open popup with pram is width="300" and height="300"
but when this popup is open when i click the link "open3" the window don't rezise width and height to "200" and "200"
Some body help me
if this popup is open and close this it and open new popup
OR if this popup is open, resize this popup with new pram
var newwindow;
function popUp(url, w, h, namn)
{
newwindow=window.open(url, namn, 'width='+ w +', height=' + h + ' resizable=no, scrollbars=auto, toolbars=no, location=no, directories=no, status=no, menubar=no, copyhistory=no');
if (window.focus) {newwindow.focus()}
}
open1
open2
open3
open4
|
|
|
|
|
Hi all, I am developing one application. In that i have created on report file which contains tables, titles and tree view list also by using HTML tags. I am opening this file in my application it self as another window.
There is no problem in opening this file if the file is small. If the file is big(here i mean to say, if number of tables present in this file are more)then while opening this file my application is displaying a message "Cannot create unique tag, giving up" (This message is given by HTML script i think) . I am unable to understand this message.
Can any one please tell me how to avoid this ???
|
|
|
|
|
Hi guys,
Need some help on this.
There are some image files available on a machine having windows OS installed. My web server is a unix based system. While creating webpage on unix based machine i need those image which are available on window OS based machine.
Is it possible to use those image files without uploading on our unix based machine.
If yes please let me know the process.
Vipin
|
|
|
|
|
Is your Windows OS is the Web server too? Can that windows machine be accessible from the Internet? If the answer for both questions is Yes then it is possible to use those image files without uploading on UNIX-base machine. If No, it's not possible. I think this might be the second time that you are asking this question. I hope my answer might be clear for you. If you still not clear then you reply to this thread instead of posting new post. Thank you.
|
|
|
|
|
Hi Michael,
My window OS machine is also Web Server can be accessible from the Internet.
Please let me know the process to access image files from window machine.
Thanks and Regards,
Vipin
|
|
|
|
|
You can just add the link as usual. Example : <img src="http://yourIISserver.com/myimage.jpg" />
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
|
|
|
|
|
Hi guys,
Need some help on this.
I'm writing a code that will allow user to download a file on a click of button (www.my-website.com).
(#1) one of the way i did was open up a new window with javascript and pass in the URL like:
http://www.other-website.com/myfile.mp3
www.other-website.com is located on another machine & different network from www.my-website.com.
the #1 works fine, the problem is, on some PC, window media player will automatically play the audio rather than download it. Try to use "content-disposition" on header, but have no idea how.
If i want to use a HttpResponse to allow user to download a file is it possible?
(#2) i wrote something like this:
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.ContentType = "audio/mpeg";
HttpContext.Current.Response.AddHeader("content-disposition",String.Format("attachment; filename={0}", filename));
HttpContext.Current.Response.WriteFile("http://www.other-website.com/myfile.mp3"); //throw exception (not recognize virtual path)
HttpContext.Current.Response.End();
so question would be:
1. if i want to use #1, is there away to include the "content-disposition" when open up a new window?
2. is #2 a possible solution? will it actually work?
Best Regards,
Henri
|
|
|
|
|
hello everyone,
i'm trying to create an active document activeX for my files. so that they would show up inside the browser after being downloaded (just like PDFs and office files).
i'm trying to use the IOleDocument and IOleDocumentView interfaces to work with IE with c#.
i've created a dll file which import the Microsoft.VisualStudio.OLE.Interop namespace and then two classes that implement the IOleDocument and IOleDocumentView interfaces. i also managed to configure IE to call my dll using a guid.
the problem begins after clicking the file click in IE, and this is the error message i get:
"the file you are downloading cannot be opened by the default program.it is either corrupted or it has an incorrect file type.as a security precaution, it is recommended that you cancel the download"
this is my code:
using System;<br />
using System.Runtime.InteropServices;<br />
using System.IO;<br />
using System.Text;<br />
using System.Windows.Forms;<br />
using Microsoft.Win32;<br />
using System.Reflection;<br />
using System.Net;<br />
using Microsoft.VisualStudio.OLE.Interop;<br />
<br />
namespace WebControl<br />
{<br />
<br />
[ComVisible(true),<br />
Guid("AB3A4D48-E6CA-42db-8D68-101D9A1BFDC4"),<br />
ClassInterface(ClassInterfaceType.AutoDual)]<br />
public class ViewerPlugin : IOleDocument<br />
{<br />
IOleDocumentView pView = null;<br />
<br />
public void CreateView([InAttribute] IOleInPlaceSite pIPSite, [InAttribute] IStream pstm, [InAttribute] uint dwReserved, out IOleDocumentView ppView)<br />
{<br />
using (TextWriter tw = new StreamWriter("c:\\log.txt", false, Encoding.Default))<br />
{<br />
tw.WriteLine("blabla");<br />
}<br />
pView = new WebControl();<br />
<br />
ppView = pView;<br />
}<br />
public void EnumViews(out IEnumOleDocumentViews ppEnum, out IOleDocumentView ppView)<br />
{<br />
using (TextWriter tw = new StreamWriter("c:\\log.txt", false, Encoding.Default))<br />
{<br />
tw.WriteLine("blabla");<br />
}<br />
ppEnum = null;<br />
ppView = pView;<br />
}<br />
public void GetDocMiscStatus(out uint pdwStatus)<br />
{<br />
using (TextWriter tw = new StreamWriter("c:\\log.txt", false, Encoding.Default))<br />
{<br />
tw.WriteLine("blabla");<br />
}<br />
pdwStatus = 8;<br />
}<br />
}<br />
}
does anybody happens to know how to actually create active documents in C#??
thanks,
Roey
Don't believe to what you hear on the news...
|
|
|
|
|
Hi,
Is writing the current time from javascript to a hidden field the only way to get the time of the PC? I am using C#, isn't there a method which can be run?
I want the time to be the moment when the insert/update button is clicked, not when the form loads because the form can be submitted 20 minutes later, or much later.
Thanks
Brendan
|
|
|
|
|
If you want to get the user's local time, you should write some javascript code in your web page to set the value of a hidden field which can be picked up on the server side when the form is submitted. Your C# code executes server-side, so you can only get the time according to your server's settings from .NET.
Of course a user can change their date/time settings, so the information you obtain from your javascript code is dependent on their settings being correct.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Sorry if this is off topic. I'm not sure which technology to use.
The company I work for contracted out a project for a client application that would connect with our server over the internet (no in-house knowledge base). It was done with ASP.NET. The client app opens port 80 to connect to our HTTP server which then opens port 1433 to access the sql server. This works fine in many situations but we are amazed at the number of problems we have encountered. The first is firewalls which we expected, but we were amazed to find a few ISP's that block port 1433. I'm also not keen on the idea of sending info in plain text to our server either.
I program in C++ for CAD and graphics engines so my knowledge of this kind of application is surface only.
But what I do know makes me think we should be setting up an HTTPS connection and then pass the data we need back as XML. I was thinking of this because we know port 433 is almost guaranteed to be open (yes maybe some super secret government agency doesn't open it). The data would be encrypted from prying eyes plus packet filters wouldn't reject it.
I'm sure this kind of application has been implemented a thousand times.
So what method do you suggest and using which technology?
Thanks in advance.
Mark
|
|
|
|
|
dear all i need help in this case ASAP
in case i have 3 webpart zones beside others and one of them is empty i wonna the second webparts Zones become bigger based on the empty area and its webpart become beggar 2 based on zone size
Ps. the 3 webparts Zone are in table with 3 column
Developer
|
|
|
|
|
Do not use "urgent" in your subject line. Most people won't care how urgent you need to get something done.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|