|
Hi,
I am trying divide my display into pages.i.e if there are 400 records then if I display 10 records in 1 page,I have 40 pages.Now I have certain conditional sql statements for which I have to retain the values of the dropboxes from which I select the Author,Name and Title of the book with the following code.
if request("ACTION")="Submit" then
for i = 1 to Request.Form.Count
'if Request.Form.Key(i)<>"ACTION" then
iname = Request.Form.Key(i)
ival = Request(iname)
if i>1 then filterIS = filterIS & "&"&iname&"="&ival else filterIS="&"&iname&"="&ival
next
session("filterIS")= filterIS
end if
but now this session variable is lost when I click on different page nos on my page.
%><%=x%><%
Please tell me how do I retain the value of filterIS so that the records for respective pages are displayed.
Thanks
|
|
|
|
|
I have read articles explaining how to host a .NET Windows Form within IE and I have a general question that perhaps someone can answer and save me some research. Once a .NET control has been constructed within IE, can this control communicate back to the HTML page that is hosting it? Can I push a button within the .NET control, and have C# code find an HTML element on it's parent page and perform an operation on it (change its color or update its value)?
If that's possible, is the reverse possible? Can a javascript operation on an HTML button, call a method within that .NET control that it's hosting? If these things are possible, can you point me to where I need to look to implement these behaviors?
Thank you in advance for any input.
-Ron Ward
|
|
|
|
|
|
Thank you for the article...that is a big help.
|
|
|
|
|
hi all,
kindly someone explain the process and coding as to how to download a file from client to server,as we generally do in attaching files thru mail
|
|
|
|
|
Two questions to help me with an answer:
1) Do you mean upload instead of download?
2) And if 'upload', using what? ASPX or a Windows Form application?
Thanks!
~javier lozano
(blog || email)
|
|
|
|
|
sorry for the mistake, its uploading to the server, it would be great if u can explain both ways, aspx and windows form application
thanks for the same
|
|
|
|
|
hi!
i'm a newbie to web development and wonder if anyone knows how to set up an audio recorder at a website?
|
|
|
|
|
pork chop wrote:
i'm a newbie to web development and wonder if anyone knows how to set up an audio recorder at a website?
Recording what?
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
The Second EuroCPian Event will be in Brussels on the 4th of September
Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!
|
|
|
|
|
hi!
i need to implement a voice recorder...
ie.. the viewer at my website wil be able to record his voice using a mic. his voice will then be stored in a file so that i can have access to the file
|
|
|
|
|
I've seen photography sites where, around each photo, a picture frame is displayed. How is this done?
My first guess would be to set the background of each data cell in a table to a transparent frame image, then use an IMG tag to load the picture over it. The picture would have to be resized to be slightly smaller than the frame image, though, and might get screwed up by oddball monitor resolutions. Would that work? What other technique would you suggest?
"My kid was Inmate of the Month at Adobe Mountain Juvenile Corrections Center" - Bumper Sticker in Bullhead City
|
|
|
|
|
Well one drastically different way would be to generate framed images with a program and use the new image on the site. Thus eliminating all HTML, CSS browser compatibility delightfulness. You could use the app dynamically or when the image is added to the site.
From the little I know of the .NET framework and ASP.NET I would think that would be fairly easy to do dynamically.
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
I have a solution that does exactly what you want.
goto: http://lab.msdn.microsoft.com/express/vwd/default.aspx[^]
download Visual Web Developer Express (it's free)
After installing it, goto: File -> New Website
Select the "Personal Web Starter Kit"
Goto: Debug -> Start
Explore the pages and find one with the frame around the photo. (defautl.aspx has one)
Open the CSS file that has the style for that image (in the folder: Themes -> White -> Default.css)
Look for the style: .photo-frame .topx-- {...}
All of the styles that have the .photo-frame will help you.
I know this might seem like overkill, but you can see how the people that wrote ASP.NET would put a frame around a photo, and you know that this way of doing it is probably the best.
There's a fine line between confidence and arrogance.
|
|
|
|
|
Nice link! Thanks...
But do you know if installing it will interfere with the existing .Net 1.1 installation and tools I already have installed. I get nervous about these things, since they almost always break something seriously.
"My kid was Inmate of the Month at Adobe Mountain Juvenile Corrections Center" - Bumper Sticker in Bullhead City
|
|
|
|
|
Hello everyone,
This project is for windows clients it consists of a bunch of maps and a keymap. I am doing image mapping on keymap, when you select an area of the keymap it brings up the associated large map in your browser window. What I need to do after that is insert some kind of code that after they verfify that the street is on the map they selected, that they can click a link (here comes the tricky part that I need help on) I want windows explorer to open and point to the tif image associated with the map. If you just use for instance [code]m:\maps\tif\sr1.tif[/code] it will ask you to download the file. I dont want that. I want windows explorer to come up and open the directory showing the tif file so the user can drag it into a autocad drawing.
Thanks for the help guys.
Lee
|
|
|
|
|
Have you tried using the 'file' protocol that IE supports?
Try the following:
Make a file on your C drive called data.txt with random text in it, then save it.
Come up with a static HTML page called test.htm that looks like this:
Have it look like this
<br />
<html><br />
<head><title>Test</title></head><br />
<body><br />
<a target="_blank" href="file://C:\data.txt">Data.txt</a><br />
</body><br />
</html><br />
Open the file using IE, then click on the Data.txt link. Is this what you are looking for? To display a directory, remove the file name from the href "file://C:\".
Hope this helps!
~javier lozano
(blog || email)
|
|
|
|
|
hi!
i've a commandline encoder which i can execute using VC, i wonder if anyone knows how i can add it to my web site?
|
|
|
|
|
Hi, I'm suing ASP and connect to Access database. When I submit the data from an HTML form to the database it display the following error message: cannot update database or object read only. Does anybody know about the source of this problem? why it display this message?
Roath Kanel
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
I am developing a MFC (VC++ 6) application which should be able to display some dynamic HTML content.
The HTML page has some static elements and some dynamic elements so I want to use DHTML.
I want to use a static HTML template and let my MFC application fill in the dynamic content. To display the HTML page I will use the IE browser component (or the MFC wrapper from Gary R. Wheeler http://www.codeproject.com/miscctrl/simplebrowserformfc.asp)
The problem which I have is: how can I access the dynamic HTML content (DOM) of my template and fill in my content using MFC.
Is there a DOM/DHTML parser?
I found a lot of information in the internet and in the MSDN library, but I could not find a good startig point.
Can anyone give me some hints or direct me into the correct direction? At least a starting point would help me a lot.
Thanks in advance.
|
|
|
|
|
Hi,
So are you saying that you want to Navigate() to your static HTML page (template) and then you want to start populating the contents of the page using MFC?
Andy
|
|
|
|
|
Thanks for your answer Andy, it's exactly what you say.
Today I have found a solution. I can get a IHTMLDocument pointer. So I have access to the HTML code.
But that leads me to another question. How can I insert an image into the HTML code which is in memory and not on HD.
Must I save the image to a file in order to insert it into the HTML document or is there an other way?
|
|
|
|
|
Hi,
Yes indeed IHTMLDocumentPtr is the starting point into the DOM.
One thing that will help in the long run is to import the HTML type library - thus getting Visual Studio to generate wrappers around the numerous interfaces and methods. It wraps using smart pointers - so no QueryInterface/Releases to take care of.
e.g. insert the following into either your header/implementation file
#import "C:\Windows\system32\mshtml.tlb" no_auto_exclude
This will generate two files, mshtml.tlh and mshtml.tli, in your project directory. The first is a header file, the next the implementation. With this done, here is a simple DHTML process from within MFC to get an element from the page...
void CWebDlg::OnDocumentCompleteExplorer1(LPDISPATCH pDisp, VARIANT FAR* URL)
{
USES_CONVERSION;
MSHTML::IHTMLDocument2Ptr spDoc(m_ctlWeb1.GetDocument());
if (spDoc)
{
MSHTML::IHTMLDocument3Ptr spDoc3 = spDoc;
if (spDoc3)
{
MSHTML::IHTMLElementPtr spElem2 = spDoc3->getElementById(_bstr_t("idSpan1"));
if (spElem2)
{
CString strText = W2T(spElem2->innerText);
spElem2->innerText = _bstr_t("Hello There");
}
}
}
}
See how we can easily get the different interfaces of the object. The wrapper is doing the QI under the covers when we do a simple assignment. Plus the smart pointer will release that reference once the object goes out of scope.
You can also easily create elements at will, e.g. here we create a BGSOUND element and append it to the DOM document.
MSHTML::IHTMLDocument2Ptr spDoc(m_ctlWeb1.GetDocument());
if (spDoc)
{
MSHTML::IHTMLElementPtr spElem = spDoc->createElement(_T("BGSOUND"));
if (spElem)
{
MSHTML::IHTMLBGsoundPtr spBG = spElem;
if (spBG)
{
CString strURL = _T("http://xyzxyz/snd/newalert.wav");
spBG->put_src((bstr_t)strURL);
MSHTML::IHTMLDOMNodePtr spBody = spDoc->body;
MSHTML::IHTMLDOMNodePtr spNode2Add = spBG;
spBody->appendChild(spNode2Add);
}
}
}
To answer your question about inserting an image - I not too sure, something at the back of my mind does ring a bell about embedding IMG data in an HTML page. I'll see if I can find out. But for now I would think about saving the image to the file-system and then referencing the IMG src tag to the location.
If you have any questions about DHTML or using MFC to generate DHTML I'll be happy to answer them.
Hope this helps,
Andy
|
|
|
|
|
Thanks for the detailed answer. I think now I have the starting point I need.
But do I need the wrappers if I don't add new HTML elements? My plan is to change existing HTML elements only.
So If I get a pointer like IHTMLElement and change the properties of the object that should be no problem?
The MSHTML documentation in the MSDN library seems also to be very good.
Thanks for your help.
|
|
|
|
|
Hi,
I would always use the wrappers as it will ease the time and readablity of your code. As an example, here is some code without the use of the wrappers:
IUnknown* lpUnk = m_pSite->GetObjectUnknown();
if ( lpUnk != NULL )
{
HRESULT hr;
IHTMLDocument2* pHTMLDocument2;
hr = lpUnk->QueryInterface(IID_IHTMLDocument2, (void **)&pHTMLDocument2);
if ( SUCCEEDED( hr ) )
{
BSTR bstrColor = SysAllocString( buff );
VARIANT varColor;
varColor.vt = VT_BSTR;
varColor.bstrVal = bstrColor;
hr = pHTMLDocument2-> put_bgColor( varColor );
pHTMLDocument2->Release();
}
}
and now the same code with the use of the wrappers:
MSHTML::IHTMLDocument2Ptr spDoc(m_pSite->GetObjectUnknown());
if (spDoc)
{
spDoc->bgColor = bstr_t("#ffffff");
}
As you can see it is substantially cleaner. And this was a simple example.
You can also call any Javascript functions (from MFC) that are in the HTML page (I can show you how if you need to)
And also, you can implement an event handler at the MFC side such that, for example, an onclick HTML event will cause the web browser control to call into your application.
Hope this helps,
Andy
|
|
|
|
|
Thanks again
I will try the wrappers. Since I only want to do some basic things I will not use JavaScript.
The simple browser wrapper for the MS Web Browser control which I use is very good. It already offers message handlers. So this should be easy.
You helped me a lot.
|
|
|
|