|
Hi all,
I have a user control with one datalist that displays thumbnails of pictures stored in the database. In the same user control, I have an Image control where I would like to display a zoomed version of the picture when the user clicks on one of the thumbnails of the datalist.
In the datalist, I have ImageButton controls to show the thumbnails. When the user clicks a thumbnail, I get the item index and retrieve the corresponding image from the dataset in the session. The image is stored as a byte array. I save the image in another session variable that will be used by an ASPX page to display it. I point the ImageUrl of my Image control to that ASPX page.
The ItemCommand event handler is as follows:
protected void dlVisuals_ItemCommand(object source, DataListCommandEventArgs e)
{
int index = e.Item.ItemIndex;
DataRow dr = sessionParams.SiteDS.Tables["TempVisuals"].Rows[index];
Session["VisualZoom"] = SiteServices.GetThumbnail((byte[])dr[2], 300, 300);
imgZoomFeature.ImageUrl = "ZoomVisualImage.aspx";
imgZoomFeature.Visible = true;
}
The aspx code to show the image is as follows:
if (Session["VisualZoom"] != null)
{
Bitmap bmp = new Bitmap(new MemoryStream((byte[])Session["VisualZoom"]));
bmp.Save(Response.OutputStream, ImageFormat.Jpeg);
}
I have put the datalist AND the Image control in an UpdatePanel and set the trigger to the ItemCommand event of the datalist.
The code works fine for the FIRST click only, i.e. when the user clicks on a thumbnail after the user control has been loaded. Subsequent clicks do not have any effect on the Image control. I have stepped into the code and I verified that the event handler is being called correctly at each thumbnail click. It seems that the ASPX page displaying the image is not working properly. I put a breakpoint in it but the program doesn't stop at it.
Any ideas?
Thanks,
Talal
-- If this is a post that has been helpful to you, please vote for it. Thank you!
"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." --Rich Cook
|
|
|
|
|
Hi,
I am using Visual studio 2005 for building my website. the website is working fine.
But the issue is: I am getting a compilation warning.
Warning: Unable to update auto-refresh reference 'chartfx.internet.dll'. Can not find assembly
'c:\Documents and Settings\kncsnmr\Local Settings\Application Data\Microsoft\VisualStudio\8.0\ProjectAssemblies\5cvgir0d01\ChartFX.Internet.dll'.
I manual browsed through my disk with above path. I was only able to go till 'ProjectAssemblies'. Because there was nothing in the ProjectAssembly folder to reach the end of the above path.
Please let me know how to clear out this compiler warning.
I would greatly appreciate any kind of help on this.
Thanks
Mohamed.
|
|
|
|
|
Might be beacuse of this dll 'chartfx.internet.dll'
are you using this dll in your application if yes then check that dll remove that dll and add once again or try to refresh that dll ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
|
I'm using an UpdatePanel along with a RegularExpressionValidator to inform the user if he/she has input the date in an incorrect format. This works fine once, but if the user types in the date wrong a second time, it doesnt show the validation error message. Any help would be appreciated.
Textbox:
autopostback = true;
causesvalidation = true;
UpdatePanel:
updatemode = Always;
|
|
|
|
|
|
Thanks John, worked great Saved me alot of time/headache. Do the other Ajax extensions work correctly?
|
|
|
|
|
Hi,
I hav implemented the functionality to call a popup window.
but while i child window appears , the value of parent will refresh.
suggest Clue If Any.
Regards
Tarun Singh
Sr. Software Engineer.
mailto:tksingh@zenta.com
|
|
|
|
|
use the following javascript function.. pass the target url, width and height of the window to be opened.
function OpenWindow(url, width, height)
{
if( url == null || url == "" )
{ return false; }
else
{
var handle = window.open(url, "scrollbars=yes,screenX=25,screenY=25,directories=0,height=" + height + ",width=" + width + ",location=no,menubar=no,resizable=yes,status=no,toolbar=no"); +
Children.push(handle);
handle.focus();
return handle;
}
}
--Sreeram
|
|
|
|
|
Does this function will refresh parent page ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
nope.. it won't
--Sreeram
|
|
|
|
|
Hi,
I hav implemented the functionality to call a popup window.
but while i child window appears , the value of parent will refresh.
suggest Clue If Any.
Regards
Tarun Singh
Sr. Software Engineer.
mailto:tksingh@zenta.com
|
|
|
|
|
If the Javascript function that is used to popup the window return's True then it will refresh. To avoid this page post back set the return value to False
Regards - J O N -
|
|
|
|
|
hi friends this is vb script\wmi code i want to change this code into vb.net please help me. if u have any url or help file then sned me thanks
Public Function ObtainLCUserInstanceID(URI)
' Connect to the WMI server.
Set wmiServer = CreateObject("WbemScripting.SWbemLocator").ConnectServer()
'Do error checking here.
Query = "SELECT InstanceID FROM MSFT_SIPESUserSetting where PrimaryURI = '" & URI & "'"
Set LCUserEnum = wmiServer.ExecQuery(Query)
'Do error checking here.
WScript.Echo "The following Live Communications User Instance IDs matched the supplied URI:"
For each LCUser in LCUserEnum
WScript.Echo LCUser.InstanceID
Next
ObtainLCUserInstanceID = true
End Function
Piyush Vardhan Singh
|
|
|
|
|
Hi Piyush,
could u kindly tell me what you are trying to do using WMI? i am not clear about it. plese let me know whats u want, hope i can help u in vb.net and C# also.;)
Happy Programming
-----
Abhijit
|
|
|
|
|
thanks for reply.
no my dear i know both language (vb and c#). i want to conver VB Script/WMI code into VB.NET(vb language in .net)
Piyush Vardhan Singh
|
|
|
|
|
i want to convert VB Script/WMI code into VB.NET/wmi(wmi is class library of .net)
Piyush Vardhan Singh
|
|
|
|
|
Hi,
If i am not wrong, that you want to covert your that VB Script code to VB.Net. and that's why i want to know the object of that function , that what it should do? for vb.net you have to use the System.management dll and nets System.Management Namespace.
I just want to know from you that what u are trying to do using that function. Or you want to convert any VB Scipt WMI code to VB.Net WMI.
Happy Programming
-----
Abhijit
|
|
|
|
|
Good morning friend
thanks for reply
yaa i want to covert the VB Script code to VB.Net and i using this WMI function in (Live Communications Server Management API). i using this wmi first time so i don't know how to make connection to server and other function of this wMI.....
Piyush Vardhan Singh
|
|
|
|
|
Hi,
U can download one tool with source code, that is WMI Code Creator which will help you to do your job !!! , In this tool you can get code of VB Script, VB.Net, and C# and i think the source code will help u
Best of luck !!!
Happy Programming
-----
Abhijit
|
|
|
|
|
Hi all,
I have made one web user control. Now I know how to pass string parameters in it but I am not able to pass server control as user control parameter. It is like we can pass data source to gridview.
Thanks in advance,
Priyank
|
|
|
|
|
You don't have to pass the Server-Control as a parameter to the User-Control. You can place it on the User-Control. User Control is similar to a container Control. It can contain any server control/any number of server controls.
Regards - J O N -
|
|
|
|
|
priyank_ldce wrote: Now I know how to pass string parameters in it but I am not able to pass server control as user control parameter.
As you said you are passing the string parameter then how can you pass control as parameter to your control
i think am confused
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
when we need to make web application deployment why we need to install asp.net after installation of .net framework .
i want to make a website in asp.net plz tell what all i need to do for this ..................................................................
hi
|
|
|
|
|
saggy_del wrote: when we need to make web application deployment why we need to install asp.net after installation of .net framework .
To build a web application using .NET, you need .NET Framework and Visual Studio installed in your PC.
To make your web application available on the Intranet, You need to Deploy it on the Server.
saggy_del wrote: i want to make a website in asp.net plz tell what all i need to do for
<br />
1. Install .NET Framework and Vsiual Studio<br />
2. Build your WebSite using ASP.NET<br />
3. Deploy it on the Server
Regards - J O N -
|
|
|
|