|
in one of the cs file i have enum like
public enum EnumError : int
{
noerror = 0,
ignorerror,
smallerror,
criticalerror
}
i want to access this enum on aspx.cs file
like this
int x=(int) EnumError.criticalerror ;
but i am not getting EnumError .????
how to do this.
|
|
|
|
|
Is this in the same namespace? There's nothing wrong with your syntax as far as I can see, so I would suspect that it's a namespace issue.
|
|
|
|
|
Hello,
I have a server side dropdown and text box in ASP.NET. There is a strage problem I have noticed.
dropdown: When I try to click this control by Mouse in firefox it doesn;t show me options. IN IE it works fine
Text box: When I try to click this control by Mouse in firefox or in IE I can not feed values. But If I reach the control by pressing TAB i can enter some values
Any kind of help is apreciated
The View source code is as below:
<select name="ctl00$IMFContentPlaceHolder$DateFromToDropdownlist" id="ctl00_IMFContentPlaceHolder_DateFromToDropdownlist" onchange=" dateControlConditions(this.value)" style="color:Black;font-family:Arial;font-size:10px;height:18px;width:110px;">
<option value="Last 24 Months">Last 24 Months</option>
<option value="Last 12 Months">Last 12 Months</option>
<option value="AFTER">After</option>
<option value="BEFORE">Before</option>
<option value="BETWEEN">Between</option>
<option value="NOT BETWEEN">Not Between</option>
<option value="ALL">All</option>
</select>
// There is a visibility style which I make visible from Javascript
<input name="ctl00$IMFContentPlaceHolder$FromDateTextbox" type="text" id="ctl00_IMFContentPlaceHolder_FromDateTextbox" style="font-family:Arial;font-size:12px;height:18px;width:65px;visibility: hidden" />
Regards,
Pavas
-----------------------
[http://longjump.com/]
Dynamic business applications that manage and coordinate teams and information
-----------------------
|
|
|
|
|
Hello Friends,
I've taken a DataList and in this datalist i've displayed images from my database.
But now i want to display a big image onmouseover accordingly the image.
For example: as i onmouseover my first image then a new big image of first image should be displayed and if i onmouseover my second image then it should display a big one of second image
something like this
http://www.asp.net/ajax/showcase/default.aspx[^]
|
|
|
|
|
Have you had a look at the code on that page? It's just javascript showing/hiding divs i think.
|
|
|
|
|
I've looked at the code on tht page.
So can u let me know how it is done.........
Further, i've solved my prob. to an extent but still there is prob.
And the prob. is i've to send the url of the image on which the mouse is hovring and the url is saved in my database so i'm using the following code for sending the url but it's throwing a parser error
The Server tag is not well formed
and the code i'm using to send the url is given below plz have a look and suggest me the right way.......
<asp:Image ID="myImage" onmouseover="doTooltip(event,0,'<%# DataBinder.Eval(Container.DataItem,"Image") %>')" onmouseout="hideTip()" ImageUrl='<%# DataBinder.Eval(Container.DataItem,"Image") %>' Runat="server" Height="125" Width="125" >
</asp:Image>
|
|
|
|
|
hi any body know how can i generate inline code automatically when creating
dynamic control on webpage........
|
|
|
|
|
Can you expand a little on what you mean? What are you trying to do?
|
|
|
|
|
hi friend
thanks for replying...
in my web page i create multiple controls dynamically with proper alignment... but these control did not generate the inline code..
is it possible to get a inline code dynamically for dynamic control
|
|
|
|
|
What exactly do you mean by inline code? Javascript?
|
|
|
|
|
No... HTML Source.
simply in .Net IDE 2005 when u design ur page, the HTML source(source view) automatically created...
i need that logic when creating dynamic controls....
|
|
|
|
|
HI
I Wrote My Code as follows. Its Working fine. But delete event didnt fire.
I also mentioned the Delete event in GridView Control
<asp:gridview autogeneratecolumns="False">
runat="server" id="gvwRoleScreen" width="100%">
OnRowDeleting="gvwRoleScreen_RowDeleting"
OnRowEditing="gvwRoleScreen_RowEditing"/>
<asp:templatefield>
<itemtemplate>
<asp:imagebutton runat="server" imagealign="AbsMiddle" commandname="Delete">
ImageUrl="~/Images/drop.png" OnClientClick="return confirm('Are you sure to delete this record?');" />
r_palanivel83 10:01 4 Jan '06
modified on Monday, December 17, 2007 5:40:00 AM
|
|
|
|
|
r_palanivel83 wrote: But delete event didnt fire
Not firing means, Client event or Server event?
|
|
|
|
|
how to create class file?????????????????
Thiwa
|
|
|
|
|
right click on the name of your project in solution explorer, then click on 'add new item', then select 'Class' and press Add button.
|
|
|
|
|
how to write a class file.pls send me a sample class file.
|
|
|
|
|
Dear All,
I got a problem with the following case: I would like to enable a button after the file export (using asp.net), the code is:
Dim fi As System.IO.FileInfo = New System.IO.FileInfo(strPath)
Response.Clear()
Response.AddHeader("Content-Disposition", "attachment;filename=" + fi.Name)
Response.AddHeader("Content-Length", fi.Length.ToString())
Response.ContentType = "Text Documents (*.txt)"
Response.WriteFile(fi.FullName)
Response.Flush()
btnXXX.enable=true
But the button cannot be enabled, i have no idea why it happened.
I got no idea about what happened...
Thank for your kind help!
|
|
|
|
|
What you set the button enable value on on page load ?
After post back he don't what you set the button enable value. so you need to check on page load.
because HTTP is a state less.
/***********************/
Parwej Ahamad
g.parwez@gmail.com
/***********************/
|
|
|
|
|
Thanks for your reply!
In page load, i have set the button .Enabled = True
but whatever i type, e.g. msgbox ("Hello")
also no response...
|
|
|
|
|
I'm not sure you can have anything after the Response.Flush(). I think you might have further problems as it is going to treat this page like a .txt file, not an aspx page.
|
|
|
|
|
Thanks for your reply!
Response.Flush() <-- it will show the save as dialog and let user to save the file
it works correctly, but the button cannot change to enable = true
|
|
|
|
|
iam having a text box if user enters a date it should be checked if the date is in dd/mm/yyyy formate other wise it should promt the user the enter date is wron
|
|
|
|
|
better you can use some calender controls instead of allowing users to enter date.
|
|
|
|
|
SCRIPT LANGUAGE="JavaScript">
<!--
function y2k(number)
{
return (number < 1000) ? number + 1900 : number;
}
var reason = '';
function isValidDate (myDate,sep) {
// checks if date passed is in valid dd/mm/yyyy format
if (myDate.length == 10) {
if (myDate.substring(2,3) == sep && myDate.substring(5,6) == sep) {
var date = myDate.substring(0,2);
var month = myDate.substring(3,5);
var year = myDate.substring(6,10);
var test = new Date(year,month-1,date);
if (year == y2k(test.getYear()) && (month-1 == test.getMonth()) && (date == test.getDate())) {
reason = '';
return true;
}
else {
reason = 'valid format but an invalid date';
return false;
}
}
else {
reason = 'invalid spearators';
return false;
}
}
else {
reason = 'invalid length';
return false;
}
}
function tellMeIfInvalid(myDate) {
if (isValidDate(myDate,'/'))
document.write(myDate + ' = valid date<BR>');
else
document.write(myDate + ' = ' + reason + '<BR>');
}
tellMeIfInvalid('21/02/1999');
tellMeIfInvalid('2190291999');
tellMeIfInvalid('2/02/1999');
tellMeIfInvalid('21/2/1999');
tellMeIfInvalid('21/02/199');
tellMeIfInvalid('32/02/1999');
tellMeIfInvalid('21/02/1999');
//--></SCRIPT>
Jithu
software developer
|
|
|
|
|
I need the next: to load image gif (transparent) and to draw over the top one other image . Here a code
Bitmap img = (Bitmap) System.Drawing.Bitmap.FromFile(badgepath + "100pct_blue.gif");
System.Drawing.Bitmap dic = (Bitmap)System.Drawing.Bitmap.FromFile(Dicitalpath +
+ "dic.bmp");
Bitmap tmp = new Bitmap(img.Width, img.Height);
int w = img.Height / 2 - dic.Width / 2;
int h = img.Width - dic.Height;
Graphics g = Graphics.FromImage(tmp);
g.DrawImage(img, new Rectangle(0, 0, img.Width, img.Height), 0, 0,
img.Width, img.Height, GraphicsUnit.Pixel);
g.DrawImage(dic, new Point(w, h));
//img.Save(Response.OutputStream, ImageFormat.Gif); //if use this, i see only first image gif
//tmp.Save(Response.OutputStream, ImageFormat.Gif); // if use this i see both image but on a black background, and it is necessary that were transparent. If who that knows,help please
|
|
|
|