|
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
|
|
|
|
|
Hi guys i want to display the date like this formate "Thursday,31stMay,2007" binding in dropdown down list in ASP.NET with vb. also i want to bind the next 4 days exept saturday and sunday.
for example: today is thursday so default "Thursday,31stMay,2007". then i dropdown the list they will show next 4 days exept saturday and sunday
Friday,31stMay,2007
Monday,31stMay,2007
Tuesday,31stMay,2007
Wednesday,31stMay,2007
how can i do this so please help me who are know this one
thanks advance.....
Praveen Kumar.R
|
|
|
|
|
You'll have to build the list by hand, there's no function for returning a sequence of days, let alone weekdays only. The DateTime class can format your date as a string, and should do everything else you need as well.
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 )
|
|
|
|
|
Hi,
Try with
Date.ToLongDateString()
Date.AddDays(1)
To succeed, we must first believe that we can.
Sherin Iranimose
|
|
|
|
|
Hi sherin tkx for ur reply,
i used that function only Date.ToLongDateString(). i want next 4 days exept saturday and sunday. how to make loop please give some ideas. if u have coding please give me.
thanks advance
Praveen Kumar.R
|
|
|
|
|
Hi,
Try this
<br />
DropDownList1.Items.Clear()<br />
Dim dt As Date = Now<br />
Dim i As Integer<br />
For i = 0 To 3<br />
If (dt.DayOfWeek <> DayOfWeek.Saturday) Then<br />
If (dt.DayOfWeek <> DayOfWeek.Sunday) Then<br />
DropDownList1.Items.Add(dt.ToLongDateString())<br />
Else<br />
dt = dt.AddDays(1)<br />
DropDownList1.Items.Add(dt.ToLongDateString())<br />
End If<br />
Else<br />
dt = dt.AddDays(2)<br />
DropDownList1.Items.Add(dt.ToLongDateString())<br />
End If<br />
dt = dt.AddDays(1)<br />
Next<br />
To succeed, we must first believe that we can.
Sherin Iranimose
|
|
|
|
|
Dear all,
Here i had a problem that when i click a textbox,it has to give the sum of two other textboxes.
I have two ideas for this,
1,using javascript
function getBal(obj)
{
var v1 = document.getElementById('txtbox1').value
var v2 = document.getElementById('txtbox2').value
if ( !isNaN(v1) && !isNaN(v2) && !isEmpty(v1) && !isEmpty(v2) )
{
var baln = parseInt(v1) + parseInt(v2)
obj.value = baln
}
else
{
alert("Please fill the fields with valid numbers")
}
}
function isEmpty(txt)
{
if (txt == "")
{
return true
}
else
{
return false
}}
2,make textbox2 property autopostback=true and on textchanged event ,i will add both the values and put in the third textbox.
Private Sub Txtbox3_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TxtExpectedYield.TextChanged
Txtbox3.Text = Integer.Parse(Txtbox1.Text) + Integer.Parse(Txtbox2.Text)
End Sub
Apart from these two can i do in any other way??
only by clicking textbox3,it shd give the sum.if txt1 or txt2 are blanks then it shd assign 0 and give the sum.
How to do this???
Thanks in advance
kissy
|
|
|
|
|
No, you've got both bases covered, do it on the client, or do it on the server.
Except that you probably want a button to post back, not the text changed event.
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 )
|
|
|
|
|
Hi,
I am doing a shopping cart in which I need to do
ICICI PAYSEAL INTEGRATION WITH ASP.NET.
Any body can help me by giving code or idea about the same.
Sameeran
|
|
|
|
|