|
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
|
|
|
|
|
|
I am creating a site that contains large documents that are stored in the database. I have to provide the search functionality in the web site. so somebody can help me in designing the search functionality.
Is there any document avilable that describes the web search functionalty design like yahoo, google etc.
Ashwani
|
|
|
|
|
I am using DTSearch and it's really nice. It has APIs and does a crawl of your site. I haven't aimed it directly at a database yet but I guess the functionality is there. Otherwise, I always create some kind of webpage that the DTSearch engine can crawl.
dtsearch.com/
|
|
|
|
|
Hi All,
I am developing Rich Text Editor and I am have to save the text in DB, the problem I am facing is with bullet list or ordered list.
Actually when newline comes it replaces the newline with some kind of box and in DB it saves all the contents which is before that box.
I need to save the whole text with newline and retrive the same text with newline.
Please help me...
Thanks in advance
|
|
|
|
|
You need to escape the unprintable character with a slash:
newline is \n
return is \r
Not sure if this will help. Can you give more information if it doesn't?
|
|
|
|
|
Thanks for the reply I got the solution but now I am facing different problem. I need to show the text on page load where text is fetched from DB.
I know I have to use Jaavscript but not getting the syntax.
Please help...
Thanks in advance...
|
|
|
|
|
You're using Javascript to get the information from a database? So you're using AJAX?
In either case (using AJAX or not) you need to have a server side page that will return the results. If you want to show the results with Javascript the server side db connection page will need to display the db resultset in a way that Javascript can read: either in XML or JSON or something else. JSON works really well and is bandwidth conservative: json.com/
|
|
|
|
|
I have one aspx page in which i am calling an Axplayer popup
window by clicking on a button.Popup window will play the video.It
does not contain any controls.
When i close that window ,the aspx page from which i am calling should get refreshed.I want code for this in C#.Please give reply soon.
Thanking you,
Await yur reply.........
|
|
|
|