|
xibeifeijian wrote: How to get 404 error before IIS?
I think you want to redirect 404 error pages to some other custom page ? For this take properties of your website in IIS. Go to customerrors tab. Click on edit properties and give the location where it should go for 404 error.
If the page is aspx you can add <error> tag for redirection
|
|
|
|
|
Thank you for your reply. I not say clearly.I want to catch 404 before IIS has detected it.Is there anyway to detected 404 error in C#?
For example ,someone request http://www.163.com/csharp and "csharp" isn't exist,now my application will get a 404 error.But I don't want to show this error for my customer,I want to redirect him to a new page like http://www.163.com/csharp.aspx?id=234&kdlg=dg&dkdk=dlg.(Just like URLRewriter).
-- modified at 1:37 Thursday 22nd March, 2007
|
|
|
|
|
Hi guys, I want to build a customized gridview in asp.net 2.0 that would allow a user to select an entire row, more column right to left or left to right depending on their choice. In addition, a user should be able to move rows up and down. As we know after a postback the girdview a server side control get draws into rows and column containing data. I am not sure how to implement the functionality and event like onmouseClick and mouseDown, row higglights and get the relative row index.
Can somebody suggest me or provide me with some detailed general overview.
Thanks
|
|
|
|
|
netJP12L wrote: I am not sure how to implement the functionality and event like onmouseClick and mouseDown, row higglights and get the relative row index.
Using javascript you can do this. When gridview is binded assign these events for each rows. First you need to identify how gridview is renedered on the page. You can see this by taking view source on the page. You should append the rowindex with these javascript functions when data is binded. Using this index value you can do all the above.
netJP12L wrote: In addition, a user should be able to move rows up and down
I am not sure that you can move the rows up and down...
netJP12L wrote: Can somebody suggest me or provide me with some detailed general overview.
For selecting rows using javascript Check This[^]
For moving rows Try This[^]
|
|
|
|
|
Thanks for your answer but what is the pattern for moving rows up and down. Is there something that someone has already done it. At this point I am not quite sure how to implement even a functionality where user can drag and drop rows as they wish. Would someone guide me to the right path to get succeded in this hard mile stone of my assignment.
Thanks in advance
|
|
|
|
|
Hello,
i tried to add an itemfield of checkboxes, so i created a new project added gridview then added to it an itemfield, to the itemfield ive inserted a checkbox to it and then implemented the on_checked event, i also actived the autopostback, when i click the check box nothing happens neither the event raising nor check change, i need the auto genreate actived cause my data is dynmamic,any ideas how to fix this?
thanks
-- modified at 17:32 Tuesday 20th March, 2007
|
|
|
|
|
EnigmaRulez wrote: i also actived the autopostback
Which controls you made the postback active ?
|
|
|
|
|
Hi,
Can anyone tell me how to compile ASP.NET code into .dll? I know that in order to upload it to the live server, we need .dll and .aspx. Is my understanding correct?
Many thanks
|
|
|
|
|
|
savagerider wrote: I know that in order to upload it to the live server, we need .dll and .aspx. Is my understanding correct?
It's not correct for ASP.NET 2.0. ASP.NET will work without dll's. You need to upload both ASPX and ASPX.CS file. If you are using asp.net 1.1 dll's will be there.
You can make dll's in ASP.NET 2.0 by publishing the website.
|
|
|
|
|
Hi,
I'm trying to use Profile, When I'm creating the user my code:
1. Membership.CreateUser(Name,...)
2. ProfileCommon p = (ProfileCommon)ProfileCommon.Create(Name,true);
3. p.MyData="abcd..";
4. p.Save();
For some reason I get different User ID's in my DB:
(aspnet_Profile)UserId != (aspnet_membership)UserId
And in aspnet_Users I get 2 different entrys under the same name one with the Profile userID and the second with the membership userID.
How can I get the same userID for all 3 Tables?
Thanks,
Rafael.
Moreno
|
|
|
|
|
I am calling a stored proc on page load
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Dim conn As New Data.SqlClient.SqlConnection
conn.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\BoultData.mdf;Integrated Security=True;User Instance=True"
Dim cmd As New Data.SqlClient.SqlCommand
With cmd
.Connection = conn
.CommandType = Data.CommandType.StoredProcedure
.CommandText = "TaskSelect"
.Parameters.Add(New Data.SqlClient.SqlParameter("@UserName", Data.SqlDbType.NVarChar, 50))
.Parameters("@UserName").Value = System.Web.Security.Membership.GetUser.UserName
End With
conn.Open()
cmd.ExecuteNonQuery()
How can I bind the results to a gridview?
The stored proc is simple like this:
ALTER PROCEDURE TaskSelect
@UserName varchar(50)
AS
Select * from Tasks
where (username = @username)
Any help would be great.
GT
|
|
|
|
|
I do not personally use stored procedures, but I'm thinking that instead of doing a cmd.ExecuteNonQuery you are going to want to
- declare a DataAdapter object,
- set it's command object to your cmd variable,
- use it's .Fill method to fill a new DataTable object
- and set your grid's .DataSource property to the DataTable.
Hope this helps.
|
|
|
|
|
Dim da as new sqldataAdapter
da.sqlcommand = cmd
conn.open
dim dt as new datatable
da.fill(dt)
gridview.datasour = dt
gridview.databind()
You can also bind to an sqldatareader which is more efficient.
|
|
|
|
|
da.sqlcommand is not valid. how about da.selectcommand?
|
|
|
|
|
Does anybody know of a way to extract the parameter values given at runtime to the crystal report viewer? For example, if I load a report into the viewer that contains parameters, I will be prompted to enter parameter values via the CRV.
These values are then used in the selection criteria of the report. If I wanted to print the values into the text property of a label, how could I access those values? (I actually want to do something else with them, but this would be
the simpliest way to explain). I have been unsuccessful locating any documentation on this. I am using VS2005 ASP.Net, VB, Version 10.2.36 Crystal Assemblies.
Basically, the built in print and export options of the Crystal Report viewer are slow and clunky. I need another way to do it, but when I try to print a parameterized report I recieve an error indicating the parameters are missing. I need to bring the parameters from the viewer into my "export to stream".
Thanks
|
|
|
|
|
I'm using the MaskEdit and have a question.
I'm using a mask like 99/99/9999 on a textbox which works great.
I keep the mask after focus is lost as I save the data to the database that way.
However, if the user deletes their entry the textbox text is "__/__/____". I'd prefer the textbox just to be blank.
I know there is a way to keep the mask if a value has been entered but discard it if the entry has been deleted (I see it done on the Atlast Control Toolkit example site).
Does anyone know how this is done ?
Thanks.
|
|
|
|
|
Hi,
I have the following maps in hand
Country map - India map
States map - All the states inside the country.
I am developing a tourist website. My requirements are as follows
1. I want to show the destinations on the map - Like all the hill
stations on the country and its highlighted may be in small dots with hill
names
2. I want to show the state maps when user selects from the country.
Inside the state user will have the tourist destinations thats also to be highlighted.
3. when the user selects the destination, user will have the details about
the destinations and the hotels available in the particular destination.
Will it possible to do this programmatically through x,y coordinates as I am having the images of country and states,
or I have to go the other way?
what is the right way to do this requirement. Please suggest.
Thanks
Regards,
Sylvester G
sylvester_g_m@yahoo.com
|
|
|
|
|
Try having a look at Google Maps as they provide some good functionality.
|
|
|
|
|
I want to start programming whith ASP.NET,and i dont know how should i start doing that!
Khodadad Pakdaman
|
|
|
|
|
go to www.w3schools.com and start from there.
|
|
|
|
|
wrote: I want to start programming whith ASP.NET,and i dont know how should i start doing that!
Quick Start[ ^]
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
i m creating an online editor and need to generate a context menu the way ms word do in order to give options for the spell errors how can i generate this context menu
|
|
|
|
|
My problem is to open design view of report so that end user can design report acording to his choice...
is it possible to open design view of rdlc or crystal report at runtime to give control to end user.
sweety
|
|
|
|
|
Hello,
I am developing application which upload the mp3 files using input control of file type in ASP.NET 1.1 framework.
In that I want to apply filter on that so that user can only select mp3 files.
Please let me know if any have solution.
Swapnil Bhavsar
-- modified at 9:00 Tuesday 20th March, 2007
|
|
|
|