|
Ok, I've found the problem myself.
I was using the $ symbol to build a reference the controls in the FindCont function, but I should have used the _ (underscore) symbol. IE seems to recognise it, but FF doesn't.
Anyway, problem solved.
|
|
|
|
|
Hi,
I have a Customer table for which I generated my model and I can edit the data in a "Dynamic Data Entities Web Application" project without effort. My Customer table has a DeliveryType column of type int, but I would like to use an enumeration to control the values that is stored in the column so I extend the partial class as follows:
public enum DeliveryTypes
{
Air = 1,
Ship = 2
}
public partial class Customer
{
public DeliveryTypes DeliveryTypeEnum
{
get
{
return (DeliveryTypes)DeliveryType;
}
set
{
DeliveryType = (int)value;
}
}
}
which allows me to write code like this: MessageBox.Show(customer.DeliveryTypeEnum.ToString()); , perfect!
My prolem however is to get my enumeration to be used in a "Dynamic Data Entities Web Application" when the data is maintained, how do I do it? Its easy enough to hide the column for DeliveryType, but I cannot get the DeliveryTypeEnum column to display
Will I have to write my own control for this?
I would prefer not to have to add another table and then ensure that the table values stay in sync with the enum values etc...
____________________________________________________________
Be brave little warrior, be VERY brave
|
|
|
|
|
I believe you have to decorate the property with a [DataContract] attribute for it to properly serialize.
|
|
|
|
|
I added the [DataContract] attribute to my enumeration and [EnumMember] to each value in the enumeration. Then I added [DataMember] to my property in my partial class to give the following:
[DataContract]
public enum DeliveryTypes
{
[EnumMember]
Air = 1,
[EnumMember]
Ship = 2
}
public partial class Customer
{
[DataMember]
public DeliveryTypes DeliveryTypeEnum
{
get { return (DeliveryTypes)DeliveryType; }
set { DeliveryType = (int)value; }
}
}
But this made no difference to the DynamicData control when I edit the data
____________________________________________________________
Be brave little warrior, be VERY brave
|
|
|
|
|
hi,
Thanks For Sending Me This...
But My Problem Is How To Pass Two Control Id To Java Script Function...
Suppose i Have a Java Script In Which It Validate Dropdown's 0 index onchange...
the first parameter is 'this', means dropdown id but how to pass div id which is runat="server"
my function
function OnChangeDropDown( DropDown, DivError )
{
var DivError1 = document.getElementById( DivError )
if ( DropDown.value == "0" )
{
DivError1.style.display = '';
DropDown.focus();
return false;
}
else
{
DivError1.style.display = 'none';
return false;
}
}
calling Style...
onchange="return OnChangeDropDown(this,<%# DivError1.ClientID %>Wink"
Now Problem is How To Pass ControlID IN Java Script Function.......
Hope For The Best Confused
Anudeep Jaiswal
09891599687
Noida
India
|
|
|
|
|
Please don't SPAM . You have already post the same thing here[^]
cheers,
Abhijit
CodeProject.Com MVP
|
|
|
|
|
.......
"Well, we're getting "F"'d at work. WPF, WCF, and WWF... WTF?" --John Simmons
|
|
|
|
|
Hello all:
At first , I make a ocx control which build a SSL connection by OpenSSL ,and then ,I want IE can share this connection ,which means that IE do not need SSL authentication again ,so IE can connect the WEB server on the SSL tunnel.
Now,SSL connection is built by OpenSSL. But ,I do not know IE how to share the SSL connection.
Any hits is welcomed !
Thank you very much!
|
|
|
|
|
stop cross-posting - pick the best forum, post there, and wait - dont spam other forums with your questions !!!
'g'
|
|
|
|
|
Hello Garth J Lancaster:
I am so sorry for this . Because I post this question in C++ forum ,but I find this question maybe will solved in WEB forum, for this question have something with the WEB .
I will pick out the best forum and post the question in next question .
Lampa
|
|
|
|
|
how to modify the html code before which loaded by browser?
i want to implement this via ExecScript method in javascript.
thanks!
|
|
|
|
|
awayer wrote: i want to implement this via ExecScript method in javascript.
Why?
---- You're right.
These facts that you've laid out totally contradict the wild ramblings that I pulled off the back of cornflakes packets .
|
|
|
|
|
|
I have a modalpopupextender for an ajax popup login window on my site. After the user logs in, I want to close the modalpopupextender and redirect them to the page they originated from (I'm using "FormsAuthentication.RedirectFromLoginPage" for this), however I'm getting a "pagerequestmanagerparsererrorexception" javascript error after I click login and try to perform the RedirectFromLoginPage. Is there a way around this issue?
My code looks like the following (I allow the user to login via their email address, hence the "GetUserNameByEmail" line in the code). It fails on the FormsAuthentication.RedirectFromLoginPage... line:
----------------------------------------------------------------------------------------------------------------------------
protected void LoginButton_Click(object sender, EventArgs e)
{
LoginButton.Attributes.Add("onClick", "this.blur();");
string username = Membership.GetUserNameByEmail(Email.Text);
if (Membership.ValidateUser(username, Password.Text))
{
FormsAuthentication.RedirectFromLoginPage(username, RememberMeCheckbox.Checked);
}
else
{
InvalidLoginLabel.Visible = true;
ModalPopupExtenderLogin.Show();
}
}
------------------------------------------------------------------------------------------------
I understand ajax fails when you try to do a redirect such as this but I don't know of an alternate way to achieve this. Any ideas?
Thanks.
-Goalie35
|
|
|
|
|
You might want to try the ASP.NET[^] forum. For your ASP.NET question. 'Cause of how it's about ASP.NET and such.
---- You're right.
These facts that you've laid out totally contradict the wild ramblings that I pulled off the back of cornflakes packets .
|
|
|
|
|
Hi all,
I have a problem in java script...
in asp.net i have a repeater.. in that repeater i have some controls and a dropdownlist.... i am showing message if user select 0 index...
function OnChangeDropDown( DropDown, DivError )
{
alert (DropDown);
alert (DivError);
var DivError1 = document.getElementById( DivError )
if ( DropDown.value == "0" )
{
DivError1.style.display = '';
DropDown.focus();
return false;
}
else
{
DivError1.style.display = 'none';
return false;
}
}
***********************
Repeater Code :
<asp:repeater id="repStudentPromotion" runat="server" xmlns:asp="#unknown">
<headertemplate>
Student Id
Student Name
Student Status
<asp:hiddenfield id="hf_sys_generated_id" runat="server" value="<%# Eval(" sys_generated_id=")%>">
]]>
]]>
<asp:dropdownlist id="ddlStatus" runat="server" onchange="return OnChangeDropDown(this,<%$ DivError.ClientID %> )">
<asp:listitem value="0"><-->
<asp:listitem value="1" selected="True">Promote To Next Semester
<asp:listitem value="2">Detained
<asp:listitem value="3">Compartment
<asp:listitem value="4">Provisionally Promoted
* Required
*********************************************************************
Calling Style in CS File:
foreach (RepeaterItem row in repStudentPromotion.Items)
{
DropDownList ddlStatus = (DropDownList)row.FindControl("ddlStatus");
HtmlGenericControl DivError = (HtmlGenericControl)row.FindControl("DivError");
ddlStatus.Attributes.Add("onchange", "return OnChangeDropDown(this,'" + DivError.ClientID + "')");
}
i want to add this attribute in aspx file as
onchange="return OnChangeDropDown(this,<%$ DivError.ClientID %> )"
*******************************************************************************
but there is a error in second parameter....
my question is how to pass controlID in javascript as a parameter instead of 'this'
waiting for reply...
Hope For The Best............Confused
anudeep jaiswal
09891599687
Noida - India
|
|
|
|
|
Pick a forum and stay with it. Just because you didn't receive a reply immediately doesn't mean for you to ask again.
only two letters away from being an asset
|
|
|
|
|
Hi guys
I am looking into a way the enable Server Side viewstate on .NET 3.5 SP1, I tried the code i used for my .Net 2.0 applications but it does not work, can anyone point me in the direction of a good .NET 3.5 example ?
Le Roux Viljoen
Web Developer
PCW New Media
South African Branch
www.pcwnewmedia.com
|
|
|
|
|
You might want to try the ASP.NET[^] forum. For your ASP.NET question. 'Cause of how it's about ASP.NET and such.
---- You're right.
These facts that you've laid out totally contradict the wild ramblings that I pulled off the back of cornflakes packets .
|
|
|
|
|
Hi,
1.
i am trying to write an asp.net application,
i have created a db and got my web app to connect and retrieve data.
i have also created a report using crystal, however when i click on the print icon, nothing happens,
it also did not display the icons but i have manage to sort that out.
any ideas why the print icon does not print?
2. i have also tried a work-around to the above by adding a pritn button and printing.
but this prints directly to my default printer.
any idea on how to pop-up the printer dialogue box for printer selection.
thanks in advance....
Anoop
|
|
|
|
|
Hi,
I am using ajax dynamic populator to populate data by calling service method from
javascript .I am getting webservice call failed:500 message.can i add any retry method in
javascript to call the service 3 times if you are not getting any response or this call
failed exception and a custom message 'please try again' if there is an web service
exception.thanks in advance and waiting for the answer and thanks once again.
-Mahesh chandra
|
|
|
|
|
I am working on an assignment where a Project Manager (PM) gets the task of picking Approvers (Appr).
This I could easily do with the Default Sequential WorkFlow if I was allowed to split it into two workflows:
1) PM picks Appr
2) Appr approves
Unfortunately the customer insists that this should be a single WorkFlow, so it is possible to see in which of three stages the WorkFlow is:
1) Waiting for PM to pick Appr
2) Waiting for Appr to approve
3) All approved
I can get the first two stages working using a While activity waiting for the PM's task of appointing to be finished. But I can't find out how to let the PM assign tasks to Apprs which also get to trigger anything on the original workflow.
Any hints...?
Kind regards - Jakob
*********************************************
Three kinds of people in the world:
- Those who can count..
- Those who can't!
10 kinds of people in the world:
- Those who understand binary
- Those who don't
|
|
|
|
|
I downloaded the trial version of dreamweaver cs4, but to my dismay , I do not have the NEEDED requirements. (Since when do they restrict you from installing it anyway!?!)
What I'm looking for is a decent alternative editor to dreamweaver, can anyone give me some links or product names?
Thanks in advance!
How many bytes of text have I typed in my lifetime??? Man, I wish I kept track...
modified on Wednesday, January 7, 2009 10:08 PM
|
|
|
|
|
|
hmmm. Well, thanks for the link. I don't really care a whole lot for any of the editors described. I guess I'm just spoiled to dreamweaver, and had my hopes to high, lol. Thanks anyway.
P.S. Would it have helped if I mentioned that I'm looking for WYSIWYG editor? Just a thought...
How many bytes of text have I typed in my lifetime??? Man, I wish I kept track...
|
|
|
|