Home » Asp.net

HOW can i write code for scrolling images in asp.net

plz help me in this topic in one perticular area the image should scroll for every 45 sec's


1 Answer Found


Answer 1

You need to use js for this

ONE You can find from


i am using the js


first try to find this else you can get some more




I am reading an image from a physical path and writing an text on it, but without saving it on physical path i need to show the edited image on page. 

Is it possible to show(write) on page with out saving the image in .net

Thanks in advance


Navin Leon


how to write a code for browser compatible in asp.net 2.0

How to write a code in asp.net for all browser compatible



hi let me knw abt the validations in asp.net...

for textbox


I know how to display an image in gridview from image path in database. Now, I want to display an image in an asp.net image control from image path in database. Can anyone point me to a tutorial? I haven't been able to find one that explains how to do it when I don't know what the image path will be. The images are in the root folder. Thanks in advance!



Here is a question.

how to convert both text and image together into an image. To clarify my question I can say if I have a text editor where I can add both text,image,audio or video player, how can I convert the whole texteditor.text (it gives me html code) to an image and save it in a file.

I will be highly pleased with your answer.

Help me please.

Thank you. 


Hi Folks, 

  I am having a requirement and i believe most of you  have already did it. This is the problem, i am having a div with image controls and i want to save it as image[png or jpeg] in database on button click. I have googled a lot but couldn't find a good start.  

<div id="frame" title="xxx" class="resize" style="width:634px; height:410px; overflow:hidden;">
<img id="drag56800" runat="server" src="Images/circle_street.png" style="height:140px;width:140px;border-width:0px;left:773px;top:123px;position:fixed;" /><img id="drag54101" runat="server" src="Images/animals/horse.png" style="height:30px;width:30px;border-width:0px;left:800px;top:171px;position:fixed;" />
Any code ,suggestion or aricle will help me.



Does the .NET framework 4 WEB chart control support scrolling?

I noticed in the Dundas documentation that the web controls supported web scrolling and zooming via Ajax.  Other than in a Silverlight control, will this feature be added to ASP.NET? 

Any reason why the feature is no longer available although it was for Dundas?



 #mce_temp_url#(search for scrolling or ajax)


Have tried numerous solutions and nothing has worked.  I'm pretty sure that Javascript is required to get this functional.

Thanks for your help! 


Here is the code for file Search.aspx


<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="search.aspx.cs" Inherits="SearchApp.search" MasterPageFile="~/Site1.Master" EnableViewState="true"%>
<asp:Content ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <legend style="text-align:center;"><b>Make Atleast one or multiple selections from one of the following categories</b></legend>
                <div class="wrapperserach">
                        <div class="side-a">
                            County<asp:ListBox ID="Lcounty" runat="server" AutoPostBack="true"  SelectionMode="Multiple" OnSelectedIndexChanged="Lcounty_SelectedIndexChanged" Width="140px">                               
                                <asp:ListItem value="1">Imperial</asp:ListItem>
		                        <asp:ListItem value="2">Kern</asp:ListItem>
		                        <asp:ListItem value="3">Los Angeles</asp:ListItem>
		                        <asp:ListItem value="4">Orange</asp:ListItem>
		                        <asp:ListItem value="5">Riverside</asp:ListItem>
		                        <asp:ListItem value="6">San Bernardino</asp:ListItem>
		                        <asp:ListItem value="7">San Diego</asp:ListItem>
		                        <asp:ListItem value="8">San Luis Obispo</asp:ListItem>
		                        <asp:ListItem value="9">Santa Barbara</asp:ListItem>
		                        <asp:ListItem value="10">Ventura</asp:ListItem>
                            <b style="color: Green;">OR</b></div>
                        <div class="contentSearch" style="padding-left: 3px;">
                            <asp:ListBox ID="Lcity" runat="server" AutoPostBack="true" OnSelectedIndexChanged="Lcity_SelectedIndexChanged" SelectionMode="Multiple" Width="140px">                              
                                <asp:ListItem value="166">Adelanto</asp:ListItem>
		                        <asp:ListItem value="19">Agoura Hills</asp:ListItem>
		                        <asp:ListItem value="20">Alhambra</asp:ListItem>
		                        <asp:ListItem value="107">Aliso Viejo</asp:ListItem>
		                        <asp:ListItem value="108">Anaheim</asp:ListItem>
		                        <asp:ListItem value="167">Apple Valley</asp:ListItem>
		                        <asp:ListItem value="21">Arcadia</asp:ListItem>
		                        <asp:ListItem value="208">Arroyo Grande</asp:ListItem>
		                        <asp:ListItem value="22">Artesia</asp:ListItem>
		                        <asp:ListItem value="8">Arvin</asp:ListItem>
		                        <asp:ListItem value="209">Atascadero</asp:ListItem>
		                        <asp:ListItem value="23">Avalon</asp:ListItem>
                            <b style="color: Green;">OR</b></div>
                <br />
                <span style="padding-left: 0px; padding-top: 100px;"><em><b>
                    <asp:Label ForeColor="Brown" ID="Label1" runat="server" Text="My goal is to limit users slections to either County or City.  When users select a County it will disable the City list box and vice versa.  Problem I'm having is that when users select county of Ventura the Listbox scrolls back to the top." ></asp:Label></b></em></span>
            <asp:Button ID="BtnSearch" runat="server" Text="Search" OnClick="BtnSearch_Click1" />



Here is the code for file Search.aspx.cs


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace SearchApp
    public partial class search : System.Web.UI.Page
        protected void Page_Load(object sender, EventArgs e)

        protected void BtnSearch_Click1(object sender, EventArgs e)


        protected void Lcounty_SelectedIndexChanged(object sender, EventArgs e)
            bool bSelected = false;
            for (int i = 0; i < Lcounty.Items.Count; i++)
                if (Lcounty.Items[i].Selected)
                    bSelected = true;
                    Lcity.Enabled = false;

            if (bSelected == false)
                Lcity.Enabled = true;


        protected void Lcity_SelectedIndexChanged(object sender, EventArgs e)
            bool bSelected = false;

            for (int i = 0; i < Lcity.Items.Count; i++)
                if (Lcity.Items[i].Selected)
                    bSelected = true;
                    Lcounty.Enabled = false;

            if (bSelected == false)
                Lcounty.Enabled = true;




Previously, the ASP.NET 3.5 Menu control displays an automatic scrolling function (e.g. down arrow or up arrow) on its submenus when there isn't enough room in the browser area to display all the submenus.

I have migrated the same intranet site to ASP.NET 4.0 and the automatic scrolling function of the sub menus is gone i.e. is no longer there.

All I get is is the vertical and horizontal scroll bars for the web browser (but theese are useless, because when you go to scroll the browser, the menu has lost focus), NOT the up/down for the actual menu itself.

I am using Internet Explorer 8 and have tried with and without Compatability View.

Any ideas? Thanks ...


i m trying to store images in my database but i dont want to write queries and C# code for it, is there a way to do it?

I'm wanting to display an image in a picture box based on a selecting in a combo box.  Depending on what i've selected in the box this is the code I'm using to display this image.

PictureBox1.ImageLocation = ("C:\Users\UserName\Documents\Visual Basic Programming Files\Graphics Files\ACPnlOvhd.bmp")

This works just fine however once deployed I don't think this will work. My Questions:

1.  How would you import this image and many more for deployment?

2.  How would you write the code to select the image both for debugging and deployment.

Example:  If the project is deployed then get the image from this location(i.e. what location will it be in the executable file)  Else it's not deployed then grab it from this file location on the local computer for debugging.

Thanks for your help


Hello, this is my first post :). I have the following issue with ASP.NET 4 VB.NET with MVC Framework 2 installed. 

The code in GLOBAL.ASAX to rename images like "domain.com/images.aspx?id=1&ref=5&size=500" is the following:

  Private Sub RegisterRoutes(ByVal Routes As RouteCollection)
    Routes.MapPageRoute("Image", "images/{Ref}/{Size}/{Id}/{Title}", "~/Image.aspx", False, New RouteValueDictionary(New With {.Title = "", .Id = "", .Size = "", .Ref = ""}))
  End Sub
  Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
  End Sub

It works OK, because now I can open the images with this format: "domain.com/images/5/500/1/1/this-is-my-seo-filename".

But like you can see, the image file do not contain the ".jpg" to the end of the url. I tried to add in GLOBAL.ASAX some code like:

Routes.MapPageRoute("Image", "images/{Ref}/{Size}/{Id}/{Title}.jpg", "~/Image.aspx", False, New RouteValueDictionary(New With {.Title = "", .Id = "", .Size = "", .Ref = ""})) 

This code convert the URL to "domain.com/images/5/500/1/1/this-is-my-seo-filename.jpg" but when I open the url in the browser I received "HTTP ERROR 404 Not Found".

How can I use the extension ".jpg" or whatever extension, in a asp.net routing url with ASP.NET 4 VB.NET? Thank you.


Hi, here is the code :

<asp:UpdatePanel  ID="updatepan1" runat="server">
<%response.write("Test") %>

I don't know why, but i can see the error in Expression Web : "code block cannot be supported in this context"

By the way, i got that i can't use it together Smile But i would like to share this bug to be fixed as an optimal error message.


Tevfik BINEN


What I have?

I have a ASP.NET page which allows the user to download file a on a button click. User can select the file he wants from a list of available files (RadioButtonList) and clicks on download button to download it. (I should not provide link for each file that can be downloaded - this is the requirement).

What I want?

I want the user to download multiple files one by one by selecting the required radio button and clicking on the button.

What problem am I facing?

I can download the file for the first time properly. But, after downloading, if I select some other file and click on the button to download it, click event of the button does not post back and the second file will not be downloaded.

I use the follwoing code on the button click event:

protectedvoid btnDownload_Click(object sender,EventArgs e)
string viewXml = exporter.Export();
Response.AddHeader("Content-Disposition","attachment; filename=views.cov");
Response.AddHeader("Content-Length", viewXml.Length.ToString());

Am I doing something wrong here?

Thanks in advance!


We are looking out ways to read/write MS-Word document(version 2003) from ASP.Net page without having MS-Office!

Is there any workaround?

Thank you


i am using .net 1.1 and sql 2000.i need to write the stored procedure in .cs file.is it possible.if so how?




I am trying to write some HTML content to a Word doc using my ASP.Net form. I have code in place using

Microsoft.Office.Interop.Wordwhich generates the doc but when I specify the text, i.e. <strong>Something</strong>, it comes through literally, not bolded. How do I get formatted text (HTML) into a Word doc? Here's what I got:


            object oMissing = System.Reflection.Missing.Value;
            ApplicationClass wordApp = new ApplicationClass();
            Document wordDoc = wordApp.Documents.Add(ref oMissing, ref oMissing, ref oMissing, ref oMissing);

            Paragraph para = wordDoc.Paragraphs.Add(ref oMissing);
            para.Range.Text = "<strong>SAMPLE HERE</strong>";

            object fileName = "c:\\test.doc";
            wordDoc.SaveAs(ref fileName, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing);
            wordDoc.Close(ref oMissing, ref oMissing, ref oMissing);
            wordApp.Quit(ref oMissing, ref oMissing, ref oMissing);




How to write French accent characters such as - é - in ASP/HTML text box? I can copy and paste it in the text box like I did now - so there is nothing wrong with the encoding - but the problem is how to type it (write it!).

I also know that é in HTML mean &eacute; but cant know how this may help!

Appreciate your help! Thanks,



I am new to learning ASP.NET and I have covered the basics however I'm doing more advanced work. More advance like having a text field and a button and having that button insert what's in that text field into a database.

My question is, How should I write the code so it can write that value into that table? It can be Visual Basic or C# , any works for me.





I have created a new ASP.Net website and included silverlight button control using <object> tag. I just want to know, how to write a event handler for that silverlight control.

My scenario

 In Default.aspx page, i have added silverlight button control. On click of that button i want to redirect to a different page say Default2.aspx.In silverlight application itself, i found an event handler for button control, but it does not support "Response.Redirect" and session variables.So i want to write an event handler in asp.net page.
Can anyone help me how to achieve in this situation.




<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Sharepoint   |   Azure