|
Hello All:
I send the HTTP request to web Server in my program ,which based on ChtmlView (MFC). and I can get the HTTP response ,the body of response is HTML element. But ,if there are some images in this web page, I think web browser need to download the images from the web server.
I want to know The web browser how to download the images. what is the trigger? When the image is download to temporary file, Is the images URL(like ) need to relocate to temporary file ?
I want to know the whole process HTML by IE or other web browser.
Thank you very much!
Lampa
|
|
|
|
|
Dear All,
In My ASP.NET/ASP web application, I have to generate Read Only or Password Protected excel(.xls)file where end user won't able to do edit in that file.
Please provide me your guidenace and suggestions .
Thanks,
Vivek
|
|
|
|
|
Perhaps someone could tell me what is wrong with this script please. It doesn't work in FireFox.
<asp:Button ID="butAddImg" Text="Image?" runat="server" OnClientClick='return SetViewImg(this,"fuAddImg");' CausesValidation="False" />
<asp:FileUpload ID="fuAddImg" Enabled="false" runat="server" />
<script language="javascript" type="text/javascript">
function FindCont(SourceCont,ContToFind){
var conPf_array = SourceCont.name.split("$");
var countArray = conPf_array.length;
var ContPath = (conPf_array[0] + "$");
for (var i = 1; i <= (countArray - 2); ++i)
{
ContPath = ContPath + (conPf_array[i] + "$");
}
ContPath = ContPath + ContToFind;
return ContPath;
function SetViewImg(controlToEval, fuContName) {
var fuControl = FindCont(controlToEval, fuContName);
if (document.getElementById(fuControl).disabled == true) {
document.getElementById(fuControl).disabled = false;
return false;
}
else {
document.getElementById(fuControl).disabled = true;
return false;
}
}
Thanks in advance.
}
|
|
|
|
|
Ginozzzz wrote: var conPf_array = SourceCont.name.split("$"); //break the name down
always use
document.getElementById(controlname)
|
|
|
|
|
Thanks, but I have to use the 1st function to return the full name for the control, since the controls are within a panel (1 of 7 panels in fact). Each panel has the same control names (except the panel name) for the purpose of smaller file sizes, and it means I can reuse many code behind functions this way.
Therefore, as simple 'document.getElementById(controlname)' doesn't work for me.
This code works perfectly in IE. Any more help please?
|
|
|
|
|
Have you debugged it? That should tell you what is wrong?
only two letters away from being an asset
|
|
|
|
|
I used the built in error console of FF, and it shows that the var fuControl is null, however, I know that fuControl does equal the fully qualified name of the control from using an alert box to show the value of fuControl.
Is this problem not obvious then? Is my JS code okay?
If not, I guess I'd better try and debug another way. Does anyone know of any programs/plug ins to use to debug remotley? As you may/maynot be aware, I am fairly new to JS. I use VWDexpress to debug on a localhost with my asp.net projects, but VWD doesn't support JS very well.
|
|
|
|
|
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
|
|
|
|