Web Forms :: Alter The Img Src Using The Code Behind?
Feb 18, 2010
I need to change dinamic my image. So I've tried to store the value in a session and replace the null src to the new src.
But. When I do this It brings me a null value in the src;
View 2 Replies
Similar Messages:
Sep 22, 2010
I have a list of buttons in a menu, and when I hover of them, I want something to change, such as a box being drawn around them, or background color chaning. How do I do that?
View 3 Replies
Oct 15, 2010
I know how to alter the web config to redirect to an errors page but what I need to do is have the actual offending error message print to that page. This is a special request for testing reasons, I realize the whole point of a custom error page is to provide a user friendly message when an error occurs but for testing we want to show the user the message so they can copy and paste it into a ticketing system we are using for beta testing feedback.
Should I use the global.asax instead? I am pretty new to vb.net and am not sure how to get the actual error message to display on my custom error page.
View 3 Replies
May 24, 2010
I have a datalist in my site which displays html tables filled with data from a sqldatasource. I need to be able to remove one column from the table and put it back again (including the tags in my table which pull the data from the datasource e.g. <%# DataBinder.Eval(Container.DataItem,"Forecast1") %>) I need to be able to do this because I have options to change the sqldatasource query, and I need to alter the table to keep it compatible with the query. What is the best way to do this?
View 4 Replies
Jul 10, 2010
I am working on a site using .aspx controls. Currently I am working on a search feature which searches my database of records and produces all applicable results to the search. Everything works as planned. I have recently added the EmptyDataText line to produce a specific output anytime no results are found in the database. However, I would like to be able to alter/change the appearance of the EmptyDataText output and cannot figure out how to do so. For example, if no results are returned from the search, I would like the EmptyDataText to produce an output of something along the lines of "Your search has produced zero results.
double check your spelling and try your search again." I would like to change the font color, font size, and possibly the thin box which is automatically produced around this output. Is any of this possible? If not, is there another way to produce the desired results? Ultimately, I would actually like to have the results actually use the terms which were input to the search within the EmptyDataText results when no search results are found within my database. For example, if "widget" was used as a search term and "widget" was not found within my database then i would like the results page to state something along the lines of: "Your search for 'widgets' did not return any results. check the spelling and try your search again." Does anyone know how to do any of these things using ASP.Net?
View 1 Replies
Mar 27, 2010
I have a repeater bound to a datasource that servers as a list of birds. When the user clicks an item in the list the bird's image is displayed on the page. I want to change the background color of the item that is currently selected in the OnClick handler for the main item in my repeater's ItemTemplate.
I have changed the styling of controls prgrammatically before and it worked fine but in those cases i used the ID of the control to directly access it in my code behind file. But since this is some arbitrary item in a repeater I don't know it's ID at runtime, all I have is the sender object passed to the control's OnClick handler. So in my code behind file, I tried casting the sender object passed to the OnClick handler to the appropriate type and used Style.Add("background-color", highlitColor) but it failed to change anything.
I had a thought - maybe this sender object gets passed by value so all I did was change the Style of a COPY of the control item.
If this is indeed my problem, how do I start with a casted sender object in an event handler and get a reference to the actual control in order to change it's Style?
View 13 Replies
Apr 11, 2010
Im importing a simple data set using sql loader, below is the controll file im using...The field named 'CustName' imports all the records but surround them in the oracle table with single quotes ... eg 'Dave' .. not Dave.. how can i alter the control file to remove these sinngle quotes when the data is imported...The field named 'registered' contains data as 'true' or 'false' in the csv... i need to import this into oracle as 1 for true and 0 for false... how can i alter the control file to do this?
my control file is as follows:
OPTIONS (ERRORS=999)
LOAD DATA
INFILE "c: est.csv"
BADFILE "c: est.bad"
INSERT
INTO TABLE test
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS
View 1 Replies
Feb 15, 2011
Is there an alter statement to rename a column name? Maybe dropping and adding a new column is the only possible way -- or so I thought?
View 3 Replies
Jul 6, 2010
I've got my Drop down list databound to an sql data source, now I need to change the data in a few of the fields before it gets displayed. I've been messing with this all morning and I can't find anything useful, this is what I've got so far and it's clearly not working.
Protected Sub ddlBookType_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddlBookType.DataBound
'ddlBookType.Items.Insert(0, "Any")
Dim i As Integer
For i = 0 To ddlBookType.Items.Count - 1
If ddlBookType.Items(i).Attributes.Equals("mod_cook") Then
ddlBookType.Items(i).Text.Replace("mod_cook", "Modern Cooking")
End If
Next
End Sub
View 1 Replies
Dec 28, 2010
i have one database named as sampleDB its having more than 100 tables. this database running on production. here we have one requirement need to add companyid feild all the tables in our sampleDb. is it possible to write query to alter all the table.
View 3 Replies
Jan 6, 2010
Here I have specified a query which gives an idea about how to drop a constraint and recrate it..
[Code]....
Parent_TableName: is the name of the table where we actually reffer.
View 1 Replies
Oct 24, 2010
I have an SQL table called tbl, im trying to add the columns A, B and C to it.
When i execute the command :
addcolumns = "ALTER TABLE SqlCreatedTbl ADD A char(50) ;";
cmd = new SqlCommand(addcolumns, conn);
conn.Open(); cmd.ExecuteNonQuery();
The column is added perfectly and i can see it in the table !
However, when i try to add multiple columns, it does NOT work, it gives me an error..
the command im writting for adding multiple columns is the following:
addcolumns = "ALTER TABLE SqlCreatedTbl ADD ( A char(50), B char(50), C char(50) );";
the debugger highlights the line : cmd.ExecuteNonQuery(); and throws the following exception: Exception Details: System.Data.SqlClient.SqlException: Incorrect syntax near '('.
View 1 Replies
Jan 9, 2011
I am looking to write a stream filer in a http module that anyalyze the output html of a page, search through the pages html for any images within the page, check if the source of the image has a full path or relative path. If its a relative path, alter it to have a full path. Anyone ever write anything anything like this? Looking for some examples of such?
View 1 Replies
Jul 23, 2010
I am developing a website where the user enters data into a form. The user can then go back and edit the data that is saved in a session variable and then the data is resaved in that session variable in an arraylist. However, for some reason although the data is resaving it is resaving the original data. I know this as I tested the code without the remove request to the arraylist and the original data was just added to the bottom of the array. I wondering if anyone would know why the new data is not saving. Any help would be really appreciated as I have only been programming for a few of months. Some of the code is below.//The gridview shown on a page which lists the objects saved by the user which he/she can edit and edit is the only one I am concerned with here as the other works
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false"
OnRowCommand="EditPenaltyPointsGridview" >
<Columns>
[code]...
View 4 Replies
Jul 27, 2010
I'm trying to create a web page using Visual C#.NET 2010 on a 3.5 framework that allows users to select items through a series of dropboxes which are then saved to a temporary display grid. The problem I'm having is that I wish to allow users to save multiple combinations of selections which are saved to various rows of the display table.
Below is a sample of what I'm trying to do.
C#
[Code]....
And here is the ASPX page:
[Code]....
The problem I'm having is whenever I try to edit the selected column all other columns are cleared. I need to have them remain while only the selected row is altered.
View 5 Replies
Jun 22, 2010
I have the following code that I wasnt to alter the Dataset before it is bound to the dropdown list.
[Code]....
What I would like to do is ALTER the dataset for the Parent (dropdown list - ddlRT). I need to format and disable certain topics. I have a script I create before I added the datarelations.
View 1 Replies
Jun 18, 2010
how do i write my alter schema query in Asp.net
using the sqlclient object..
View 3 Replies
Dec 14, 2010
I've already searched to no avail for an answer to this question:is it possible to dynamically alter the page size in a paged gridview based on data in a particular column?In other words,let's say I get data from a table that lists students enrolled in a particular course.If there are 10 students in Course "A," then I want page 1 in my gridview to show 10 records.
If there are 15 students in Course "B," then I want page 2 in my gridview to show those 15 records,and so on.I imagine that this could probably be done with a master-detail kind of set up,but let's say for the sake of argument that I don't want to go that route.
View 4 Replies
Jun 20, 2010
I've found very little on developing skins for controls online. I can do everything except to know what the attributes / properties in a skin file are. I need a good resource for all attributes / properties for controls. Apart from that is it possible to do a lot more than can be achieved with css. In particular to change the appearance of the FileUpload button so that it matches all the other ImageButtons' appearances on my web page.
View 2 Replies
Feb 22, 2010
Im using two stored procedures to write and update values in a SQL DB. Im using the SQLDatasource update method. When I run the webpage on my development server everything runs fine. When I try and run the web page on my Live server I get the following error :System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding This always takes 30 seconds to fail - and looking at google it seems that this is a connection timeout error.In my web.config file I have updated the connectionstring line to include a timeout setting :
connectionString="Data Source=myserver;Initial Catalog=ReportServer;Integrated Security=True;Connect
Timeout=10000"
But this hasn't helped at all.
View 3 Replies
May 9, 2010
I need to change a user's role in my application. Therefore I need to know the correct syntax in code behind to alter a user's role; i.e. string sql = "ALTER TABLE ...etc". I'm not sure how to implement this at all. Is it similar to the INSERT INTO query used in code behind, where we define the parameters etc?
View 2 Replies
May 7, 2015
I have issue in Mathematical captcha, its not working in IIS,Image path not getting, it shows altertext "Captcha".
View 1 Replies
May 6, 2010
I have a table that contains image data type and has more than 20,000 records.I want to change its file group to the new file group. I tried to change it using table designer, but everytime I wanted to save it, it occured an error with this message:
[Code]....
Does anyone know how to change file group using Alter Table query? I'm using SQL Server 2005.
View 2 Replies
Mar 21, 2011
I have a web application, in which browser's back button functionality should be customized. It's like, whenever we click on browser's back button, it should take us to landing page(Login page), It should display error message saying that 'session expired. Please login again'.
I have gone through so many posts and even in stack overflow also, i saw few posts. But nothing worked for me. The java script approach i am using as a temporary workaround.Basically this JavaScript never allow us to go back. instead it will keep us in same page. JavaScript i have used <script>history.go(1)</script>
customize the functionality of Browser's back button.
View 3 Replies
Feb 22, 2010
I am using SQL SERVER 2008 database. I have a table Customers in which the CustomerID column is had datatype INT intially but due to increase in Customers the number range is exceeding which may cause error arithmetic overflow of data. Hence I thought to modify the datatype from INT to BIGINT and wrote an alter script but when I ran the script it failed. Hence provide me in creating alter script for the updating the datatype of the primarykey column for the Customers table.
View 2 Replies