|
Hi,
what is the syntax for Finding control in GridView1_RowCommand
thanks!
|
|
|
|
|
Give commandname to the controls you use. then use e.commandname to get the control
|
|
|
|
|
Hey guys ! I'm using a wizard to creat a custom user registration, and I'm using some fieldvalidators and compareValidators ! I have a button on my page (other than the wizard's button next) when I click that button I get all the errors from validators !!!!! why do i get this ??? Is there any way to prevent this or do I have to manually creat some labels and code that ?
thanx
Mr.K
|
|
|
|
|
You can write javascript that manually calls or ignores the validators on the page. I forget the details, although I did it, by digging into the code that is generated by the framework
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
mrkeivan wrote: I have a button on my page (other than the wizard's button next) when I click that button I get all the errors from validators !!!!! why do i get this ???
Set the button's CausesValidation property to false.
[ My Blog] "Visual studio desperately needs some performance improvements. It is sometimes almost as slow as eclipse." - Rüdiger Klaehn "Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
I want 2 captur the browser close button so that i can clear the session.
For that i used the OnBeforeUnload method it works for the close event.
But this also gets invoked when the back button of the browser is clicked
so can u suggest any method that just invokes on the close and not the back button.
|
|
|
|
|
|
You can capture the BACKSPACE key press or Button Click on one of the JavaScript event "onKeyDown". call a javascript function on the event "onKeyDown" and check for the keyCode and set a variable to true or false and check the variable status in the onbeforeUnload event.
BACKSPACE - 8
if (window.event.keyCode == 8) {
//your code
}
Regards John
|
|
|
|
|
how to display the scroll bar of the grid view.
i have tried this.
Add this CSS to your GridView.
style="OVERFLOW: auto; WIDTH: 200px; HEIGHT: 120px"
but its not working. so is there any solution for this
|
|
|
|
|
|
In online shooping, when any customer click at AddToCart button.
The customer first login,and I save customer's data in database
with login-id. So all customer's data is saved with own login-id.
hence,we retrive customer data in select statement with where condition = login-id.
But I want that there will no option of login, then how we manage all customer's data, so that shopping process be possible....
Plz help me..
Thanks
Ajai Chaudhary
|
|
|
|
|
You could use the user's session id to initially store their selections against. However, at some point the user is going to have to provide you with some personal information (name, address, credit card no) to make their purchases. It would be better to have some way of persisting user details so they don't have to enter the same information every time they come to your site to make a purchase.
Paul
|
|
|
|
|
Hello frnds,
suppose i have a a word/HTML file stored at Server and if i am show it using IE then it show the physical path of the file in address bar,
for security purpose, is there is any class that will first copy the file to windows temp folder and show it from temp folder, by this we can hide the actual location of file
please any helpful link,Code .. ?
regards,
koolprasad2003
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
Do a Google search for streaming files using ASP.NET.
Paul
|
|
|
|
|
When you've got that sorted out, add a content disposition to the response so the browser prompts for a save location.
context.Response.AppendHeader(
"Content-Disposition",
"attachment; filename=\"SuggestedSaveName.doc\""
);
|
|
|
|
|
Hi all,
I am using ASP.net 1.1 with backend MSSQL.
I have a table Category
Catid Catname
C1 Test1
C2 Test2
I have a Request table
id request categoryid status flag
1 abcd Request C1 0 F
2 xyz request C2 0 F
3 sdf request C1 1 I
4 ab Request C1 1 I
5 prz request C1 1 I
6 frf request C2 1 F
7 frf request C1 1 F
8 frf request C1 1 F
i want show its countlike
CaetgoryName Waiting INCOMING OUTgoing
Test1 1 3 2
TEST 2 1 0 1
how i make sql query???
is there any way show this to my webform???
thankx in advance..
All I ever wanted is what others have.... CrazySanker
|
|
|
|
|
Write a query that includes a GROUP BY clause to group by the fields you want to count on (categoryd).
Use the COUNT aggregate function to count the instances of records with a particular categoryid.
Paul
|
|
|
|
|
hi frndz,
I got is solution...
creat a UD function
<br />
CREATE FUNCTION GetCount (@Request CHAR(1), @CatID VARCHAR(5)) <br />
RETURNS INT AS <br />
BEGIN <br />
<br />
Declare @Count INT<br />
<br />
IF @Request = 'W' --Waiting for approval<br />
SELECT @Count = count(RemitterRefNo) from TblRemittanceTxn<br />
WHERE Category='O' AND status=0 AND Catid=@CatID<br />
<br />
ELSE IF @Request = 'I' ---Incoming <br />
SELECT @Count = count(RemitterRefNo) from TblRemittanceTxn<br />
WHERE Category='I' AND status=1 AND Catid=@CatID<br />
<br />
ELSE IF @Request = 'O' --OutGoing<br />
SELECT @Count = count(RemitterRefNo) from TblRemittanceTxn<br />
WHERE Category='O' AND status=1 AND Catid=@CatID<br />
RETURN @Count<br />
<br />
END<br />
and use a query like this
<br />
Select distinct catname, <br />
dbo.GetCount('w',catid) as waiting_count,<br />
dbo.GetCount('i',catid) as incoming_count,<br />
dbo.GetCount('o',catid) as outgoing_count,<br />
from Category
All I ever wanted is what others have.... CrazySanker
|
|
|
|
|
Hello There
I have one asp.net page for user registration. It displays when user click Sign In. This is a modelless popup ( I tried Modal as well) The page has to get all the information and on click of submit it needs to post the data to server. The problem is when I click submit button it opens a new window automatically and submits the data in that window.
Is there any solution where I can Stop the opening of new window and could post the data within same window ?
Thanks
|
|
|
|
|
Check Form tag in html source,
I think there is an action property U have set it. remove it.
or
check ur button click event.
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
No there is no Action proprty set as this has to auto post . The form tag is set to runat="server" so on button click when there is a server side event it auto post the form and you do not need to set the actions or any manual method to submit.
Problem still there. if you would try this by adding two pages you could see what I means
|
|
|
|
|
Runtime Error
Description: An application error occurred on the server. The current custom error<br> settings for this application prevent the details of the application error from <br> being viewed remotely (for security reasons). It could, however, be viewed by <br> browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on <br> remote machines, please create a <customErrors> tag within a "web.config" <br> configuration file located in the root directory of the current web application. <br> This <customErrors> tag should then have its "mode" attribute set to "Off".
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Notes: The current error page you are seeing can be replaced by a custom error <br> page by modifying the "defaultRedirect" attribute of the application's <br> <customErrors> configuration tag to point to a custom error page URL.
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>
I am getting this Error ever after I set <customerrors mode="Off"> in my web.config file.
I am not using an sessions or database connection or login page etc.It's just a simple site.
I want to know the best setting of web.config file for hosting
I have not failed. I've just found 10,000 ways that won't work. -Thomas A. Edison
Thank u
Chandu
|
|
|
|
|
Set CustomErrors mode="Off" in ur webconfig file
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
Thanks for u r reply.
I already made the change even then it is giving the same error.
I have not failed. I've just found 10,000 ways that won't work. -Thomas A. Edison
Thank u
Chandu
|
|
|
|
|
Ensure that you have loaded the web.config file in your root directory
Jith
|
|
|
|