|
Thanks for the input, the hidden field should do the job.
And we shall see what they make for us in the next version of ASP.net 
|
|
|
|
|
Hey
Well i have like 300 computers on my network and most of them are running on windows 98 .
my friend build a web application that asks the user for a catalog
number and in javasciprt it display the "catalognum.jpg"
the problem is that after the user load something like 20 pictures
the page is not showing more pictures,it's look like that there is no memory ....
here is most of the code
function myfunction(filpath)
{
if (filpath !== "")
{
imgtasrit.src = "DocLib/"+filpath+".jpg";
}
else
{
imgtasrit.src = "image003.gif";
}
}
/script>
.....
input type = button value="??? ?????" onclick="myfunction(form1.tb1dk.value)" align="right" id="Button1" >
i just wondering if there is way to clean the memory on client side ?
|
|
|
|
|
This is using ASP.NET ? I'd still ask in the web dev forum, as it's a generic client side question.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi.
I am creating a website that will have timed exams, I want to setup the timer in my asp.net application and I want the timer to be updated (using javascript) in th UI. when the time ends I want an automatic submission of the page.. any idea how to do this using asp.net + javascript? I also need to know the value of the timer each time the page is submitted..
Many Thanks
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
AJAX.............Will be helpful...
Dont Get Paid for the Hours you worked, Get Paid for the Work You Have Done in an Hour.
|
|
|
|
|
Any details, plz?
I need the simplest way for implementing this thing . Thanks
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
You don't need AJAX at all, although you could use it. Just set a timer using one of the many javascript timer code examples that exist on the web. Set the users starting time on the server, and always use that to reset the timer on postback ( it's so easy to change client side script, you should never rely on it being correct ).
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I am writing a WebPart for SharePoint and am having trouble re-painting a control (not ASP control) when I want to reflect some scripting action.
My class inherits from "Microsoft.SharePoint.WebPartPages.WebPart".
I found the ASP listbox control lacking because I wanted to include a checkbox, graphics as well as text for each item.
An array of checkboxes contained within a div (for scrolling) contained in a feldset (for a border to contain the entire set) made for a good display of the data with the ability to access each item individuality.
The array is rendering the way I want it with a checkbox, icon and text for each item and the scrolling is working properly.
I am able to check and un-check each individual item in the array of checkboxes but the CheckAll() and ClearAll() functions are not checking or clearing all the items in the array.
Can anyone tell me what I need to do to make the CheckAll() and ClearAll() functions work?
In "protected override void RenderContents(HtmlTextWriter writer)"
<br />
writer.Write("<fieldset style='width: 760px;'>");<br />
writer.Write("<legend><strong>" + lblDocInfo.Text + "</strong></legend>");<br />
<br />
writer.Write("<div style='overflow: auto; height: 145px;'>");<br />
<br />
foreach (string folder_key in current_folders)<br />
{<br />
writer.Write("<input type=checkbox name='" + folder_key + "' id='" + folder_key + "'><img src='http://sharepointservername/projectname/websitename/icons/folder.ico' align='middle'> " + folder_key.Substring(folder_key.LastIndexOf("/") + 1) + "</input><br />");<br />
}
<br />
foreach (string doc_key in current_docs)<br />
{<br />
writer.Write("<input type=checkbox name='" + doc_key + "' id='" + doc_key + "'><img src='http://sharepointservername/projectname/websitename/icons/doc.ico' align='middle'> " + doc_key.Substring(doc_key.LastIndexOf("/") + 1) + "</input><br />");<br />
}
<br />
writer.Write("</div>");
<br />
writer.Write("</fieldset>");<br />
<br />
writer.Write("<br /><br />");<br />
writer.Write("<input id='btnCheckAll' type='button' value='Check All Documents' onclick='CheckAll();' style='width: 380px;' />");<br />
writer.Write("<input id='btnClearAll'type='button' value='Clear All Checked Documents' onclick='ClearAll();' style='width: 380px;' />");<br />
writer.Write("<br />");<br />
btnProcess.RenderControl(writer);<br />
writer.Write("<br /><br />");<br />
and further down in the code
<br />
writer.Write("<script type='text/javascript'>");<br />
<br />
writer.Write("function CheckAll(){");<br />
foreach (string doc_key in current_docs)<br />
{<br />
writer.Write("document.getElementById(doc_key).checked = true;");<br />
}
writer.Write("document.getElementById('btnClearAll').disabled = false;");<br />
writer.Write("}");
<br />
writer.Write("function ClearAll(){");<br />
foreach (string doc_key in current_docs)<br />
{<br />
writer.Write("document.getElementById(doc_key).checked = false;");<br />
}
writer.Write("document.getElementById('btnClearAll').disabled = true;");<br />
writer.Write("}");
<br />
writer.Write("</script>");<br />
|
|
|
|
|
What does it mean ?
How does it occur ?
and what should I do ?
It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
Tnx
|
|
|
|
|
razi_Seyyedi wrote: This error can be caused by a virtual directory not being configured as an application in IIS.
There you go. I suggest you read the article I link to in my sig, especially the bit on researching error messages.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
It means that you have an application level section in a web.config file that is not in the root folder of your web.
Either you have put an illegal section in a web.config file in a folder in your application, or what you think is the root folder of your application is just a folder in another application.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
... instead of creating Resource files for each language.
Is it possible?
---
Harsh Gupta
|
|
|
|
|
Are you Sonia's brother ?
What do you mean by 'dynamic' ? Creating resources for each language is the best way I can think of to create resources so you can change the language of your site, if you wanted it to happen via some translation algorithm or something, that could only end in tears.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hi,,
on my project asp.net with c#
I added a javascript item for eg,, name : JS.js
and made the next function :
function PopUpQtyWindow(id)<br />
{<br />
window.open("productqty.aspx?id=" + id, "Cart", "status = 1, height = 150, width = 200, resizable = 0"); <br />
}
then on any page i tried to call this function as next :
<br />
int prodID = 1 ;<br />
HyperTest.NavigateUrl = "javascript:PopUpQtyWindow(" + prodID + ");";
when running project and press the hyperTest .. status message " Error on page " .
thanks for all .
jooooo
|
|
|
|
|
1. What error message you get?
2. Do you have configuration like down below?
<br />
.<br />
.<br />
.<br />
<script type="text/javascript" src="JS.js"><br />
</script><br />
.<br />
.<br />
.<br />
I Love T-SQL
|
|
|
|
|
thanks for your reply my friend
the error message is appear on the status bar of the internet explorer :
Error on page,
that is the error message ,, no debug
jooooo
|
|
|
|
|
You can click on that error message to show you details, so you can see what the error is. Either the function is not present, or it's got an error in it.
I would recommend installing firefox and the firebug add on, then you can debug your javascript inside the browser.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I will install it and try ,,
thanks my friend
jooooo
|
|
|
|
|
Hi,
Test this way:
<br />
protected void HyperTest_OnClick(object sender, EventArgs e)<br />
{<br />
try<br />
{<br />
int prodID = 1 ;<br />
Page.ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "PopUpQtyWindow(" + prodID + ");", true);<br />
}<br />
catch (Exception ex)<br />
{ <br />
throw;<br />
}<br />
}<br />
|
|
|
|
|
Really thanks for your reply ..
on my example the code as next :
HyperTest.NavigateUrl= ....
when i use the code :
HyperTest.NavigateUrl= Page.ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "PopUpQtyWindow(" + prodID + ");", true);
then error message:
Cannot implicitly convert type 'void' to 'string'
thanks for aiding me
jooooo
|
|
|
|
|
No no, HyperTest.NavigateUrl is wrong.
Say, I test your code in this way:
<br />
<script type="text/javascript" language="javascript"><br />
function PopUpQtyWindow(prodID)<br />
{<br />
alert(prodID);<br />
}<br />
</script><br />
<asp:linkbutton id="HyperTest" runat="server" onclick="testClick" text="Test"></asp:linkbutton><br />
And in behind:
<br />
protected void testClick(object sender, EventArgs e)<br />
{<br />
int prodID = 1;<br />
Page.ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "PopUpQtyWindow(" + prodID + ");", true);<br />
}<br />
This code is working on both IE and firefox browsers.
|
|
|
|
|
|
I have a DetailsView in which I have a DropDownList in the EditItemTemplate.
I need to access the list and populate it when the Edit command is clicked on the DetailsView.
I tried the following:
<br />
protected void dvStation_ModeChanged(object sender, EventArgs e)<br />
{<br />
DetailsViewRow row = dvStation.Rows[0];<br />
DropDownList ddlStatus = (DropDownList)row.FindControl("ddlStatus");<br />
ddlStatus.DataSource = dsStatus;<br />
ddlStatus.DataTextField = "STATUS_NAME";<br />
ddlStatus.DataBind();<br />
}<br />
But its not populating my list. I also tried a SqlDataReader, did the connection and SQL, then used a while loop to populate like:
<br />
cmd = new SqlCommand(sql, conn);<br />
dr = cmd.ExecuteReader();<br />
while (dr.Read() != null)<br />
{<br />
ddlStatus.Items.Add(dr.GetString(0));<br />
}<br />
That didn't do it either...
Any ideas?
Thanks.
Ekjon
|
|
|
|
|
Do it in the prerender event of the detailsview
Ask if currentmode is editmode
If so, get the ddl and bind it
Inside the prerender event
If Me.detailsview.CurrentMode = detailsviewmode.Edit Then
''Get ddl and bind it
End If
Alexei Rodriguez
|
|
|
|
|
Hi Alex,
It worked fine, thanks.
Now, the list is populated but I want to select the item that is the current status. So, in the same prerender - I opened the connection, got the data and tried to select it.
Didn't work.
Then I tried the same thing in ItemCommand event (Occurs when a button within a DetailsView is clicked), didn't work either.
Any idea on this?
Thanks again.
Ekjon
|
|
|
|