|
Ekjon wrote: I can't figure why my images are not showing up on my web form - instead, there is that little icon indicating the image is there (otherwise, it would be a red cross).
I think the problem is with image path. Run you web site, Right Click on Red Cross Icon, Click Properties. Or check the same from View Source. Now Compare the path of original source and the current source.
|
|
|
|
|
Hi all,
I am facing a strange problem regarding session variables. I developed a website where a kept the login information in Session variables. It worked fine but now Session is not maintained i have checked after response.Redirect the session is lost and the value is null on the redirected page. I have searched a lot and tried many solutions but useless. I have only one session variable which is used to store the user name to display it on all pages and allowing some login based functionality.
Please help me in this issue.
Looking forward to hear a solution from codeproject.
Thank You
|
|
|
|
|
What is the SessionState Mode[^] in your web.config? Is it set to off?
Be careful, there is no Undo Button(Ctrl+Z) in life.
|
|
|
|
|
Dear Sir,
I am using
sessionstate mode="InProc" cookieless="false" timeout="40"
Every thing was working fine a week ago.
Thank You
|
|
|
|
|
Waheed Ur Rehman wrote: i have checked after response.Redirect the session is lost and the value is null on the redirected page.
Can you please put the line of code for Response.Redirect() and Session Store ?
|
|
|
|
|
Hey....U can directly put username in session.
Session["UserInfo"] = LoginName;
and u can access that value in another page like
string Loginname=Session["UserInfo"].toStirng();
|
|
|
|
|
As per his replies, He tried that and problem lies somewhere else
|
|
|
|
|
hi friends,
i am try to get wmv player through COM Components in ASP.NET . i am adding but that object not displaying in ToolBox. how can we will do that. please explain me
thank you yours. somasekhar
j somasekhar
|
|
|
|
|
|
I know it's pretty basic.
I have some image controls on a page.
User will upload the images and the images will show up in the image controls as they are uploaded (there is a max number they can upload).
I was trying to access them to see if imageurl is empty - so I can take the first control to put the image, then the second one and so on.
But it's not working. Here's what I am trying:
foreach (System.Web.UI.WebControls.WebControl webctrl in this.Controls)<br />
{<br />
if (typeof(webctrl) is Image)<br />
{<br />
if (webctrl.ImageUrl.Equals("") == false)<br />
{<br />
++count;<br />
}<br />
else<br />
{<br />
img.Visible = false;<br />
}<br />
}<br />
}
Any idea? Thanks.
|
|
|
|
|
how does it evaluates the LOC - when you try to debug the line below
if (webctrl.ImageUrl.Equals("") == false)
|
|
|
|
|
Hallo,
I have a DataSet from 2 DB tables, and i want to databind some textboxes(say N, created dynamically) at runtime.
Is it possible to have 2-way databinding without using gridview or reapeater etc.
That is, i have a set of textboxes and labels in a table. The textboxes should implement 2-way databinding.
Thanks
|
|
|
|
|
Hi,
Can anyone help me with the following problem please;
I need to drop the 'www' part of a url whenever it is entered by a visitor. So for example if they type 'www.domain.com/' it goes to 'domain.com/'. Likewise it should do the same for specific files and folders eg 'www.domain.com/files/test.jpg' should redirect to 'domain.com/files/test.jpg'.
The updated domain name should be shown in the url.
I am running this on IIS on a dedicated machine over the web. I using the 'redirect' function in IIS i can only get it to redirect to a specific url rather than the exact corresponding file / domain location.
WOuld it be better to do this with a .Net config file?
Help greatly appreciated.
Thanks!!!
|
|
|
|
|
|
You may try like following code snippet
private string newUrl = System.Text.RegularExpressions.Regex.Replace("www.domain.com/files/test.jpg",
"^www\.", String.Empty);
Server.Transfer(newUrl);
Hope I answered you correctly
|
|
|
|
|
I'm trying to pass values within an insert statement, however, I'm not sure what is the best way to pass the most appropriate value to the taskID_PK column bigint identity. The identity column is normally filled in automatically.
An insert statement to the table returns the following error:
Cannot insert the value NULL into column 'taskID_PK', table 'teamwiki.dbo.task'; column does not allow nulls. INSERT fails.\rThe statement has been terminated."
VS 2005 / ASP.NET 2.0
SQL Server 2005 Express
Related links:
Understanding identity columns
Jon
|
|
|
|
|
How does the insert-statement look like? Do you set the identity column explicit?
Regards
Sebastian
p.S: Are you sure that the primary key is generated automatically?
|
|
|
|
|
Well the insert statement excludes this key, because I assumed , that the behavior would be similar to that as when I update the table manually, for example:
"INSERT INTO [teamwiki].[dbo].[task]\r
([category_FK1]\r
,[sub_category_FK2]\r
,[ideal_delivery_date]\r
,[latest_delivery_date]\r
,[task_deadline]\r
,[request_date]\r
,[requesting_user]\r
,[assigned_to]\r
,[managed_by]\r
,[implementor_notes]\r
,[attachment] \r
,[last_update]\r
,[in_use])\r
VALUES (@category, \r
@sub_category,\r
@task_description,\r
@priority,\r
@status, \r
@ideal_delivery_date,\r
@latest_delivery_date,\r
NULL,\r
GETDATE(),\r
@requesting_user,\r
NULL,\r
NULL,\r
NULL,\r
NULL,\r
@in_use,\r
@product)" string
In my case, the primary key is named taskID_PK, as previously posted.
2. When I update data manually (e.g. through SQL Management Studio > right click on the table > Open table), the key is automatically incremented.
3. I created the table with an identity trigger simply using SQL Management Studio:
3.1 Taking a copy of the CREATE TABLE. Right click on table name > Script Table As > CREATE TO > New Query Window.
3.2 Dropping the table. Right click on the table name > delete.
3.3 Altering the CREATE TABLE statement to include identity:
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[task](
[taskID] [numeric] (2, 0) identity NOT NULL,
[task_description] [nvarchar](50) NULL,
[date_entered] [datetime] NULL,
[productID_FK1] [numeric](2, 0) NULL,
CONSTRAINT [PK_task_1] PRIMARY KEY CLUSTERED
(
[taskID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[task] WITH CHECK ADD CONSTRAINT [FK_task_product] FOREIGN KEY([productID_FK1])
REFERENCES [dbo].[product] ([productID])
GO
ALTER TABLE [dbo].[task] CHECK CONSTRAINT [FK_task_product]
Attempted solutions
-------------------
Since the key is a primary key, it doesn't accept any NULL values; it was recommended to use identity columns as opposed to a trigger that alters the table upon insert, because "it would be a computational suicide".
Related links
--------------
Forum post[^]
Jon
|
|
|
|
|
Hmmm, sounds difficult. Maybe you have to activate the Identity_Insert property explicit. Run this query before you insert a line:
SET IDENTITY_INSERT taskID_PK OFF
Could you provide a snippt of the code, executing the command?
Regards
Sebastian
|
|
|
|
|
I have created a windows control project. The control contains a datagridview. Now I'm trying to get it to work on an asp .net page. I have put the following code in the page:
<object id="myControl1" name="myControl1" classid="MyClientControl.dll#MyClientControl.AuthorsControl" style="width: 505px; height: 145px></object><br mode=" hold=" /><br mode=">
|
|
|
|
|
You know this means your users need .NET installed and need to fully trust your site over IE's warnings, right ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
|
Hi
Error updating JScript IntelliSense: Client-side script IntelliSense information was not generated due to an error in an external script reference.
How can I fix it ?
I follow this step from :
- Step 1: Install VS 2008 SP1
VS 2008 SP1 adds richer JavaScript intellisense support to Visual Studio, and adds code completion support for a broad range of JavaScript libraries.
You can download VS 2008 SP1 and Visual Web Developer 2008 Express SP1 here.
- Step 2: Install VS 2008 Patch KB958502 to Support "-vsdoc.js" Intellisense Files
But nothing still receive this error in visual studio.
Please help
Thanks
|
|
|
|
|
how to fetch stock market values in asp.net application,is there any script available,please let me know
hi this is rakesh
|
|
|
|
|
First of all you have to find a service that will give you this information. They will tell you how to retrieve the information in the format that they deliver it in (probably some XML structure these days)
|
|
|
|