|
Sherin Iranimose wrote: in page load give
Butten1.Attributes.Add("onclick","javascript:ValidateControl()")
Only, you don't use the "javascript:" protocol when you don't put the code in an url.
Button1.Attributes.Add("onclick","ValidateControl();")
or in framework 2:
Button1.OnClientClick = "ValidateControl();"
---
single minded; short sighted; long gone;
|
|
|
|
|
greetings to all... i really appreciate your help it gives me new ideas and gives me more closer to what i wanted to do...
now again i need your help on how to enable to allow sorting on a gridview in which the column header not came from the controls design, but instead from run time... using ASP.NET 2005
sorry i mistakenly post this question on VB.NET forum..
start a new beginning in every ending; thats what life for......
|
|
|
|
|
Please don't cross post.
Please try to write a subject line that is relevant.
---
single minded; short sighted; long gone;
|
|
|
|
|
am i not right this is for ASP.NET FORUM?
my question ask is for ASP.NET 2005.. im not crossing post..
before you make a comment or advice others pls read the lines that i have posted in this forum... thank you
start a new beginning in every ending; thats what life for......
|
|
|
|
|
Hi,
Everybody post their problem to get help only.
The point here that your subjeline should be clear.
Your subject line should depict your problem briefly.
Your subject line coulde "Implement Sorting in gridview" or "Problem in sorting with gridview".
"Need Help" dosent show anything and many of the people are not keen to open such type of thread and hence the chances you get the solution is less and response time is more.
I hope you got my point.
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
The sorting is usually done before the data gets to the gridview. If you are using a sqldatasource or an objectdatasource those controls will sort the data for you. If you are not using those controls you need to sort it when the data is returned from the database.
Hope this helps.
Ben
|
|
|
|
|
thank you sir i really appreciate your help and idea...
it helps me to try on other routines.. following your advice..
thank you sir
start a new beginning in every ending; thats what life for......
|
|
|
|
|
Hi,
I have need to redirect to login page when the session timeout (when user leave the browse idle not when he signout).
i can't check the session on Page_Load event because i doing this if the session object is null then user can visit to another pages.
only i have need to redirect the use to login page only when the session timeout.
Thanks.......
Regards,
OnlySri..
|
|
|
|
|
There is a session timeout event in the global.asax, but this is not reliable. Still it is the best you can do. Note it only works if you are using inProc sessions. If you are using session server or sql to store session the event in the global.asax will not fire.
Ben
|
|
|
|
|
I don't understand why you can't check in Page_load...
If Session.IsNewSession Then Response.Redirect("login.aspx")
Fred
|
|
|
|
|
hi all...
i need help for datagrid
Datagrid is in "DIV" container and when i'm scrolling header of the datagrid is not fixed.
And the header has Check box for selecting all records.
plzz reply ASAP
Regards
Pushpa
-- modified at 7:25 Thursday 31st May, 2007
|
|
|
|
|
|
even though i have added the style sheet in HTML, i'm not able to get the header wen i'm scrolling
plzz reply ASAP
Regards
Pushpa
|
|
|
|
|
In my aspx page i am displaying images as small size(thumbnails). when i click on any of the image that image should be displayed as large in the same page of another largeimage control.it is working ,but everytime when click on images total page is refreshing .I want to refresh only that image control...how to o that?
I am doing this using asp.net 1.1 and visual studio.net 2003
Is it possible using these????
plz let me know.
Thanks in advance.
Haritha
|
|
|
|
|
I have a simple problem that I need to know either the best solution for or a list of the options.
I need to export data from a database into a an excel spreadsheet. I will more than likely use a stored procedure to create the result set and then use a datareader to bind to whatever object you suggest.
The spreadsheet needs to be emailed to a recipitent so I would prefer it as a memory stream object so I have the flexibility to do this.
Thanks
|
|
|
|
|
This[^] is one way of doing it.
SG
|
|
|
|
|
Hmm looks like a lot more code than I was expecting. Also doesn't look ideal for my situation eg opening instances of excel etc.
Someone else suggested exporting to XML or CSV and then importing to Excel?? Any ideas on this?
|
|
|
|
|
In either case, if you want an Excel object in memory, to be attachable in Email, you need to instantiate using interop.
SG
|
|
|
|
|
i have a webform and in that i have a user control which contains some textboxes and a button and a datagrid.upon clickin the button the grid gets populated depending on the search criteria.this happens fine when i click on the button.but i want to perfrom the same for an enter key press.how can i do that.
thanks, in advance
vinod mattipalli, software engineer, chandler information systems.
|
|
|
|
|
You have to write javascript that captures the keypress, works out what it is, and calls teh script to submit with that button.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
<br />
TextBoxThatIsFocuseWhenEnterPressed.Attributes.Add("onKeyPress", "doClick('" + ButtonToTriggerOnEnterPress.ClientID + "',event)")
Put that in the page load event.
And then this in the page
function doClick(buttonName,e)<br />
{<br />
var key;<br />
<br />
if(window.event)<br />
key = window.event.keyCode;
else<br />
key = e.which;
<br />
if (key == 13)<br />
{<br />
var btn = document.getElementById(buttonName);<br />
if (btn != null)<br />
{
btn.click();<br />
if(window.event) event.keyCode = 0;<br />
<br />
}<br />
}<br />
}
If it were me I would put the javascript code in a sperate js file and then reference it into the page. Why? Chances are you will use this elsewhere once youv'e got the function so it saves posting the code into each page.
If you didn't know you do it like this
<br />
<script type="text/javascript" src="JavaScript/DefaultButtonScript.js"></script>
|
|
|
|
|
Another option, you can define a default button for your page (other containers support this as well) which creates the needed JS for you.
The end result (rendered JS) would look like this:
onkeypress="javascript:return WebForm_FireDefaultButton(event, 'SomeButton')"
It's pretty much what was offered, just an easier implemenatation if it works for your particular situation.
|
|
|
|
|
hi
How to creating jpg image file while i am working on the mypage.aspx?
I need to capture the screen and save it as jpg file.
I need to work that in Visual Sudio .net 2003 and the Framework 1.1.
Is it possible or not?
will you please tell me. It's very urgent
thanks
tamil
|
|
|
|
|
Your aspx file cannot do a screen capture on the client. It can, on the server. I'm guessing that's not what you want tho ?
Your aspx does not run on the client at all, the client just gets html, javascript and css.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
Please help me, I dont know solution to Convert from Pdf file to Html by asp.net? help me
-- modified at 21:27 Thursday 31st May, 2007
|
|
|
|