|
gReaen wrote: I tried displaying contents of a table but it shows the contents even after i delete them from the table.
Sounds like you either have to refresh the table or commit the changes to the database.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I tried deleting it directly from the table. It clearly shows that there are zero rows in the table but, the webpage still displays it. Is there any alternatives to reflect that change on the webpage?
|
|
|
|
|
Two reasons:
1) Commit Changes After Deleting Rows
2) Page being displayed from cache
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Hi,
I wanted to know what the best method is to retrieve a image from a database and display it along with other components on the same web page.
I have searched for a number of methods, most of them use a picturebox (which is not available to me as im making a web application), or they use Response.BinaryWrite to display the image to another webpage (tried this method, can not get the image to display with other components).
I am also not to keen on creating a temporary file.
Please help, I have been stuck with this problem for 2 weeks now and im going crazy!!
Thank You,
Faesel Saeed
|
|
|
|
|
You need to create a http handler for a custom extension, and use that to binary write your image back to the page. When you write an img tag, a seperate HTTP request happens to download from the URL, so you need to provide a URL that will be caught by your handler, load the image bytes and stream them back.
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 )
|
|
|
|
|
Hi Christian,
Thanks a lot for your reply you wisdom is greatly appreciated,
I have implemented a http handler and successfully displayed the image to the browser, only problem is that it now overwrites everything and is the first thing seen when starting the web application. As soon as the web application is loaded the http handler is called.
By the way I am a noob at this so don't laugh at me if I write something stupid. Could you please tell me if I am doing something wrong?
Http handler:
public class ImageHandler : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
Game game = new Game();
Byte[] image = game.retrieveImage(_imageId);
context.Response.BinaryWrite(image);
}
}
Web.config:
<httpHandlers>
<add verb="*" path="*.*" type="WebApplication.ImageHandler, WebApplication"/>
</httpHandlers>
and image tag:
<asp:Image ID="Image1" runat="server" ImageUrl="ImageHandler.ashx"/>
Thanks,
Faesel Saeed
|
|
|
|
|
Hi,
Ignore my previous post I have since discovered the problem, if anyone is interested in what i did i have shown my coding below:
web.config file:
<system.web>
<httpHandlers>
<add verb="*" path="http://localhost:1130/Game.*" type="WebApplication.ImageHandler, WebApplication"/>
</httpHandlers>
</system.web>
NOTE: before I had an incorrect path....very incorrect
Image tag:
<asp:Image ID="Image1" runat="server" ImageUrl="~/ImageHandler.ashx?id=1"/>
http handlers .ashx code:
public class ImageHandler : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
int _imageId;
if (context.Request["id"] != null) //Parameter being passed from the image tag
{
_imageId = int.Parse(context.Request["id"]);
}
else
{
throw new ArgumentException("No parameter specified");
}
Game game = new Game();
Byte[] image = game.RetrieveImageDB(_imageId);
context.Response.BinaryWrite(image);
}
public bool IsReusable
{
get
{
return false;
}
}
}
Hope this helps,
Faesel Saeed
|
|
|
|
|
How does connection pooling work between SQL Server and classic ASP?
What if the Hokey Kokey IS what it's all about?
|
|
|
|
|
Have a look to the following script:
http://files-upload.com/files/638449/Script.rar[^]
It is generated automatically by Microsoft Visio.
Open the HTML file with the browser and you will see a map with some control in the left. The control panel could be navigated to be hidden or shown. I want the control panel to be hidden by default.
Could any body please help me and see if you can change something in the code to do so.
Regards
|
|
|
|
|
Menhal wrote: Could any body please help me and see if you can change something in the code to do so.
Yes. Yes, i could.
Oh, wait, you want us to download a RAR file off of some random site, pour through the code inside (if, that is, it actually contains code and not rootkitvirusworms), and tell you how to fix it? Sure! Where do i submit my invoice...
If you have a question, at least respect the people here enough to do a bit of the footwork. Find the code, find the relevant portion(s) of the code, and post them here - along with a good explanation of what you don't understand about it, and why. Oh, and lastly - if the reason you're unable to do this yourself is that you have absolutely no knowledge of the language or platform involved... then go learn it. At least read an introductory book. Otherwise, there's almost no chance that you'll actually understand any answers anyway. And then come back and ask your question if you still can't answer it on your own.
---- ...the wind blows over it and it is gone, and its place remembers it no more...
|
|
|
|
|
Sorry for my way of representing my problem. I realized that I was wrong and I did not have to rely on you for the whole thing. Sorry again.
But actually I think that the code is using frames for dividing the page and I did not know how to deal with that.
|
|
|
|
|
Hi,
I have a common search window (popup )- which should be opened from multiple parent window and should get the search result back to parent page.
I tried it out and it is working pretty good , only if one parent window is there....
not working for multiple window...
please help me out...
send me the code snippet also, if you can,,,
|
|
|
|
|
choorakkuttyil wrote: I have a common search window (popup )- which should be opened from multiple parent window and should get the search result back to parent page.
I tried it out and it is working pretty good , only if one parent window is there....
How, exactly, would you see that working with multiple parents? Especially considering that creating a window with multiple parents isn't actually possible on any platform i've ever used. You could hack something in involving the pop-up actually being the parent, since windows can have multiple offspring... but that sounds horribly messy.
Pop-ups are passé anyway. Just put a search box on each page and be done with it.
---- ...the wind blows over it and it is gone, and its place remembers it no more...
|
|
|
|
|
Actually i have to update some multiple rows at a time in the following code.
constr=Application("ConStr")
set con_adm=CreateObject("ADODB.Connection")
con_adm.open constr
This is the connection to the database and then the query which is not executin
sql_upd="update csd_order_item set ref_no="&ref_no(i)&",item_desc='"&description(i)&"',unit_price="&price(i)&" where oredr_no="&orderno
here orderno is the primary key and against that particular refno all the items will be updated, that means refno and orderno are the candidate key
when i am executing set rs=con_adm.execute(sql_upd) it is showing incorrect syntax.
please it will be very kind of u if somebody could help me.
skd
|
|
|
|
|
neoghy wrote: when i am executing set rs=con_adm.execute(sql_upd) it is showing incorrect syntax.
So dump the generated query and run it manually against your DB. Look for typos, missing spaces, misquoted strings, etc. Then figure out which part of your long string of concatenations broke it.
---- ...the wind blows over it and it is gone, and its place remembers it no more...
|
|
|
|
|
1] how do i call an managed code from an unmanaged code .....
2] similarly is there any other way of embedding an unmanaged code in managed code without creating a DLL
It Ain't Over ,Till It's Over
|
|
|
|
|
mastermind.aj wrote: 1] how do i call an managed code from an unmanaged code .....
AFAIK, there is no unmanaged code in ASP.NET.. If you wanna use the unmanaged code (e.g COM) from ASP.NET, you just need to reference it.. Meaning that you can call the unmanaged code from managed code..
mastermind.aj wrote: 2] similarly is there any other way of embedding an unmanaged code in managed code without creating a DLL
No. Could you please tell me how you wanna use? Why?
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Pls how to i connect to database(Sql2005 express edition) using dreamweaver and how do i write the codes to insert, select, update the database etc
How d i also preview the website in windows explorer so that i can see the design view instead of the codes cos i tried using aspx.Net c# as my erver technology when seting up a testing site and on previewing the browser displays codes instead of the design view. Thanks;P;P
IT'S GREAT TO BE HERE
|
|
|
|
|
Hi All,
I have a tree in the division in a HTML page and I wanted to disabled that division on a certain condation. Is it possible to disable whole division in Javascript ao that the tree inside that division should not be accessible to user but it should be visible?
RK
|
|
|
|
|
What about this?
document.getElementById('divid').disabled=true;
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
document.getElementById('divid').disabled=true; is not working. Not disabling the division.
RK
|
|
|
|
|
If you run this code in IE, the textbox will be disabled. (but you can still type the characters in textbox so that means the color of textbox is changed and the textbox won't become the readonly mode. )
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Untitled Page</title>
<script type="text/jscript">
function disableDIV(){
var d = document.getElementById('div1');
d.disabled = true;
}
</script>
</head>
<body>
<div>
<div id="div1">
<input id="myTextbox" type="text" />
</div>
<input type=button onclick="disableDIV();" />
</div>
</body>
</html>
So, What I suggest you to do is that show the transparent image which has same size on this div. The user won't be able to click your treeview as long as the image is showing over it.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
I also have same problem. I have tried your suggestion with an image to achieve the functionality of disabling tree structure inside div . i have set z-index for image but still it is showing that image below div.
JyotiRawat
|
|
|
|
|
JyotiRawat wrote: i want it to show above di
it's strange.. Can you show us the code that you wrote??
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
I took an image tag in form
on some selection criteria, i used
document.getElementById('_loading').style.visibility = 'visible';
I expected to show image over div but its not working.
JyotiRawat
|
|
|
|