|
Try OnClientClick event
Sincerely,
Elina
Life is great!!!
Enjoy every moment of it!
|
|
|
|
|
thanks,but onclientcliect is a property when i tried it no action occur.
if you have a code exemple that will be great.
Dad
|
|
|
|
|
Here is an example.
All this is part of your aspx page (not the code-behind)
<code><script type="text/javascript">
function =ConfirmClick()
{
alert("On Client Click event! I am in =ConfirmClick function")
}
</script>
<asp:Button ID="SubmitBtn" runat="server" OnClientClick="ConfirmClick()"
OnClick="SubmitBtn_Click" Text="Submit" /></code>
Sincerely,
Elina
Life is great!!!
Enjoy every moment of it!
|
|
|
|
|
Thanks alot,it works really good.
thank u again.
Dad
|
|
|
|
|
New user looking at sample code and I can't differentiate when to use the "'s on server and when not to.Sometimes I see runat=server, other times runat="server". What's the difference?
Yeppr
|
|
|
|
|
Yeppr wrote: What's the difference?
There isn't any difference other than A) Inconsistent coding or B)Buggy Visual Studio not always surrounding server in quotes.
|
|
|
|
|
i have no problem in sending the email, but my problem is that theres some unicode characters in the email which is not readable when viewed at the client. however i used UTF-8 encoding like:
mMessage.SubjectEncoding = System.Text.Encoding.UTF8;
mMessage.BodyEncoding = System.Text.Encoding.UTF8
heres what i do from the begining
i first open an html file and get its content in a string
sr = File.OpenText(System.Web.HttpContext.Current.Server.MapPath(@"~\Controls\Mailer\Templates\common.htm"));
mystring = sr.ReadToEnd();
then i replace some words in the string with my own, like:
mystring = mystring.Replace("%name%","unicode word");
and finally i send this string as html in the email body.
only the replaced words is not readable but the other unicode characters that was originally in the htm file is fine !
am using c# asp.net 2.0
i also want to note that everythin was going fine in .net 1.1 , that happened only when i switched to .net 2.0
can u please find any solution ?
i will really appreciate any idea
thanx in advance.
We never stop learning
|
|
|
|
|
Protected Sub btn_sub2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_sub2.Click
'view type selection
view_type = ddl_cesum.SelectedItem.Value
title_view = ddl_cesum.SelectedItem.Text
Session("view_type") = view_type
'estimate type selection
If rb_int.Checked Then
est_typ = "INITEST"
title_est = "Initial LRE"
ElseIf rb_scp.Checked Then
est_typ = "SCOPEEST"
title_est = "Scope LRE"
ElseIf rb_ph1.Checked Then
est_typ = "PHSE1EST"
title_est = "Phase I LRE"
ElseIf rb_ph2.Checked Then
est_typ = "PHSE2EST"
title_est = "Phase II LRE"
ElseIf rb_ph3.Checked Then
est_typ = "PHSE3EST"
title_est = "Phase III LRE"
ElseIf rb_ph4.Checked Then
est_typ = "PHSE4EST"
title_est = "Phase IV LRE"
ElseIf rb_ofct.Checked Then
est_typ = "OFCLEST"
title_est = "Official Cost"
End If
Session("est_typ") = est_typ
'period
'month and year selection
If rb_cemon.Checked Then
objBaseClass = New BusinessObjectBase
month_year = objBaseClass.get_month_year(ddl_ceyrs1.SelectedItem.Value, ddl_cemon.SelectedItem.Value)
from_date = month_year(0)
to_date = month_year(1)
title_mon_year = month_year(2)
'Quater and year selection
ElseIf rb_ceqtr.Checked Then
objBaseClass = New BusinessObjectBase
quater_year = objBaseClass.get_quater_year(ddl_ceyrs2.SelectedItem.Value, ddl_ceqtr.SelectedItem.Value)
from_date = quater_year(0)
to_date = quater_year(1)
title_quater_year = quater_year(2)
' Only year selection
ElseIf rb_ceyrs.Checked Then
objBaseClass = New BusinessObjectBase
year = objBaseClass.get_year(ddl_ceyrs3.SelectedIndex)
from_date = Year(0)
to_date = Year(1)
title_year = year(2)
End If
Session("from_date") = from_date
Session("to_date") = to_date
page_title = title_view & " " & title_est & " Estimate Totals for " & " " & title_mon_year & title_quater_year & title_year
Session("page_title") = page_title
Response.Redirect("Ce_sumlist.aspx")
Response.Redirect("Ce_sumlist.aspx?v_type=" &
view_type & "&e_typ=" &
est_typ )
End Sub
|
|
|
|
|
You forgot to ask a question.
---
single minded; short sighted; long gone;
|
|
|
|
|
No he didn't, he keeps posting crap on other boards too, and then votes you a 1 if you mention this to him...
What an idiot.
|
|
|
|
|
Hi
I am testing an ASP.NET site on Vista (it runs fine on XP and Server 2003).
We get a fault in the published site (not under debug though, on Vista) that I think is due to file permissions.
This was resolved on Server 2003 and XP bu granting permissions to the ASP.NET Machine Account (appears as ASPNET when granting permisions).
VS 2005, .NET 2 etc etc are all installed and (apparently) working fine, we can debug the site too.
I'd expect the account to have been setup as part of VS 2005 install, but it seems to be absent.
I did run aspnet_regiis -i too, but to no avail.
Any info much appreciated.
Hugh
Advanced Persistence
http://www.morantex.com
|
|
|
|
|
How can we combine a transparent GIF image with a JPG file and save the resulting image in disc.
I want the GIF to act as a frame that we can see the JPG image through it . Help me please.
Thanks.
|
|
|
|
|
You can't combine the files, you have to unpack them into images and combine them.
Load the JPG file into a BitMap object and the GIF file into another. Create a Graphics object for the first image and use that to draw the second image into the first. Save the result as a new image file.
---
single minded; short sighted; long gone;
|
|
|
|
|
Thanks , Can you mention function calls needed ??
|
|
|
|
|
The FromFile and Save method in the Image class and the FromImage and DrawImage methods in the Graphics class.
---
single minded; short sighted; long gone;
|
|
|
|
|
Graphics.FromImage(...) function does not work for GIF Images but works for PNG images.
I have problem saving the contents of Graphics object to disc , can you show me the way ???
Thanks
|
|
|
|
|
devboycpp wrote: Graphics.FromImage(...) function does not work for GIF Images but works for PNG images.
Standard question #1:
What do you mean by "not working"?
I have problem saving the contents of Graphics object to disc , can you show me the way ?
The Graphics object doesn't contain anything that you can save. You save the image that you have drawn on.
---
single minded; short sighted; long gone;
|
|
|
|
|
Please don't cross post in multiple forums!
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Hi,
Can anybody help me how to restrict users to browse only some specified type of files in FileUpload controls browser button.
If I need to write any code pls., give me some help. Thank you.
Regards,
Aleem.
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Hello,
im building a web application and although 90% of the users will be internal employees the other 10%
will be the customer.
Tying to keep user accounts in one place I didnt want to create a new sql database.
So I thought about usins AD as the Authentication.
Ive read in places that you should not use this for external users but the info was a bit grey I was wondering if anyone
can give me a low down on why I should not use AD.
Thanks
|
|
|
|
|
Hi.
i want to add controls at runtime in catalog zone.
please look at the code below
<ZoneTemplate>
<asp:DeclarativeCatalogPart ID="DCP1" runat="server" title="Available Panels">
<WebPartsTemplate >
<SMART:WelcomeMessage runat="Server" ID="WelcomeMessage1" title="Welcome Message" Visible="false"/>
<b><MyLastForecasts runat="server" ID="myLastForecasts1" title="My Last Forecasts" Visible="false" />
<MyLastProjects runat="server" ID="myLastProjects" title="My Last Projects" Visible="false" />
<LastFiveQuotes runat="Server" ID="dlLast5Quotes" title="Last 5 Quotes" Visible="false" />
<MyForecastToApprove runat="server" ID="MyForecastToApprove1" title="My Forecasts To Approve" Visible="false" /></b>
</WebPartsTemplate>
</asp:DeclarativeCatalogPart>
<ZoneTemplate>
in this code, the bold text area in of controls that i have to add runtime, actually it depends on user rights to see.
my real problem is adding conrols to catalog zone at runtime.
Can anyone help me for this issue ???
|
|
|
|
|
PLease put the code in the
section <br />
Can u tell what do u mean by catalog zone ? <br />
<br />
<br />
<div class="ForumSig"><font color="gray">Thanks and Regards</font><br />
Sandeep <br />
<br />
<font color="blue" style="font-style: italic">If you want something you never had,<br />
do something you have never done!<br />
</font><br />
</div>
|
|
|
|
|
Hello,
I have an ASP.NET app where I want to display a few labels and images on a page if the user hits the back button on the browser. How would i be able to capture the back event on my app ? iam a little new to ASP.NET to sample code will help too !!!
this is my situation
Page(A)---> Page(B)
if someone presses the back button on Page(B) i want to show Page(A) with certain modifications. Thanks for your help !!!
Regards
RH
|
|
|
|
|
Hi,
What are the possible syatax (usage) that we can able to give in the below symbol in the Design view of asp.net page?
<% %>
(eg) <%= .... %>
FYI, I wish to display all my data from DataSet. In my GridView, I am using the Dataset as a data source. So I wish to know the usage of <% %> in the Design view. I have googled for the all possible usage of <% %>. But its helpless for me.
Regards,
Jay
|
|
|
|
|
Don't know about DataSet, but if you use
DataView or DataTabel the syntax is
<br />
<%#DataBinder.Eval(Container.DataItem, "theColumnName").ToString()%><br />
I have experiensed that I have to use the <%=...%> sometimes
<br />
..table cellspacing="0" cellpadding="0" border="0" style="width:"<%=SomeStaticValue%>"..<br />
|
|
|
|