|
Christian Graus wrote: update it *daily*
Missed that word. I was actually reading news from NDTV website where it shows a little marquee, which perhaps inspired me.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
The obvious thing to do here is to have a database which contains the daily news, a page which allows you to enter news for today, and a main page that pulls the most recent news story and shows it.
Christian Graus - Microsoft MVP - C++
"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 need to get a session variable's value (filename) into the aspx page,so that I can load a session based filename into Media Player Embedded.The Jscript works with a static filename at present.
// FROM THE CODE BEHIND THE ASPX PAGE
this.Session["WavName"] = Server.MapPath(@"..\captchaTmpWavs\")
+ this.Session.SessionID + ".wav";
// FROM THE ASPX PAGE
function StartMeUp()
{
MediaPlayer.Filename = "";
}
|
|
|
|
|
you can register the whole javascript function from code behind using clientscript.registerscriptblock
or you can try this
MediaPlayer.Filename = "<%=Session["WavName"]%>";
-----
|
|
|
|
|
Tried this solution and get 'Unknown Exception' when
I press My Run button.
MediaPlayer.Filename = "<%=Session["WavName"]%>";
|
|
|
|
|
I doubted that because I never tested that.
Do this right after you set the session:
<br />
<br />
string script = string.Format("function StartMeUp(){ MediaPlayer.Filename='{0}'; }</SCRIPT>", Session["WavName"]);<br />
<br />
ClientScript.RegisterClientScriptBlock(this.GetType(),"WavName",script,true);<br />
<br />
-----
|
|
|
|
|
The client is stuck for now with framework 1.0
so I had to use the older Page.RegisterClientScriptBlock.
string script = string.Format("function StartMeUp(){
MediaPlayer.Filename='{0}'; }", Session["WavName"].ToString());
Page.RegisterClientScriptBlock("StartMeUp",script);
Compiles fine, but during Page Load I get the error "Input string was not in a correct format." I can't spot the problem.
|
|
|
|
|
in the view source of the HTML page, see what the ending string the above code has registered. You may have to add language='JScript" in and @ sign before Session["WavName"].ToString().
<div class="ForumSig">-----</div>
|
|
|
|
|
You are putting a physical file name in the session variable. That is useless in a web page, you need the virtual file name.
Do you need to keep the file name in the session for some reason? Otherwise you don't need a session variable to put the value in the page. A plain member variable in the page works just fine.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
Hi guys,
I'd like to gather some ideas on how to implement a menu navigation trail feature.
What I am referring to is the feature present on some websites when you go down into the menus.
ie. this site, if you go to http://www.codeproject.com/sqlrs/ the menu trail shows: All Topics, MFC/C++, C#, ASP.NET, .NET, VB.NET >> SQL Reporting Services
|
|
|
|
|
this looks like a linked list. so you have to go to top level node until you don't get any (the top level/parent is null) and display all of them. all parent nodes will be displayed as a link and current node will be displayed without any link
-----
|
|
|
|
|
I guess this approach would work fine if the menu is created dynamically from a DB, so I can pre-populate the linked list.
Thanks!
|
|
|
|
|
|
Hi,
i'm a beginner in asp.net programming and web for that matter,
and in need of some help.
i use an unknown amout of tables that i need to view, lets assume the connection string and select query are entered by the user.
i need in the page_load or somewhere to create a dataset and set the gridview to it. the grid view is a static control on the web form.
now i am using:
protected void Page_Load(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection("con str");
SqlDataAdapter ad = new SqlDataAdapter("select str", con);
DataSet ds = new DataSet();
ad.Fill(ds, "test");
con.Close();
this.Controls.Add(data);
theGrid.DataSourceID = data.ID;
theGrid.DataSource = ds;
theGrid.DataBind();
}
this works, but each click/change that causes a postback will call page_loaf again. i tried to define the ds variable as private var of the class, and then put the 3 first lines in an if (!postback) {...} statment.
didn't work, the vars are recreated on each post back.
what is the solution for this?
how can i create a grid that will be saved without re binding it?
(and if i don't add the ds to the form as a control, it just doesn't bind)
help!!!
thanks, koren.
kosh2059
kosh2059
|
|
|
|
|
kosh2059 wrote: didn't work, the vars are recreated on each post back.
Yes, because when a request comes in to the web server a page is created, it is populated, it is rendered to the clien browser, the page on the server is then destroyed. The server does not keep a copy of all the pages currently open by the various browsers that are linked to it. So when a browser makes a new request the server has to go through the whole sequence all over again.
|
|
|
|
|
Hi,
I am having the strangest problem when trying to use a standard Javascript popup. When using the popup on my local machine the addressbar is hidden correctly but when I upload the page to the server, the address bar is shown.
The code I've tried so far consists of variations of the following:
window.open("pagename.html","GamePreview", "scrollbars=yes, resizable=no, location=no, toolbar=no");
thanks
ps: I've noticed the same thing happening with the code project preview window.
"In this new wave of technology, you can't do it all yourself, you have to form alliances."
Carlos Slim Helu
|
|
|
|
|
try this
<br />
window.open("pagename.html","GamePreview", "status=no,directories=no,location=no,menubar=no,toolbars=no,scrollbars=yes,resizable=yes");<br />
you can set the values to yes or no as required
-----
|
|
|
|
|
i want to dispaly the contents of xml in iframes without the tags <titie></title> etc....
|
|
|
|
|
Why not use one of the techniques explained in the answers you were given before ?
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
just like in e mails ,if i hav 100 mails ,it displays 10 mails on the page and if i click next button it displays another 10.
so i have a lot of data .so i want to display it on my webpage in parts i.e. if i hav 100 lines the webpage should display 10lines on my webpage if i click next the page it must get next 10 lines on the same webpage not on another webpage.
|
|
|
|
|
|
The Gridview at least supports paging.
Christian Graus - Microsoft MVP - C++
"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 real new so if this is a no brainer I appologize
I have a real simple web page, when I debug it it works fine,when I copy the files to my internal server and try to run the page I get an error.
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load type 'XXX.Global'.
Source Error:
Line 1: <%@ Application Codebehind="Global.asax.vb" Inherits="XXX.Global
What is this error and how do I go about resolving it? Do I need to re-build somethign onteh server or have it re-build something?
|
|
|
|
|
make sure that you have the DLLs in the bin folder.
|
|
|
|
|
I have a problem with a child window using the parent's FORM to do a submission/post to open a new window. This is being blocked by IE7. This is happening when accessing an external website that is not listed in the IE7 pop-up blocker allow list.
If the current page does a FORM submission/post to target "_blank" then this is allowed and a new window pops up. However, if the new child window calls opener.top.document.someForm.submit(); then this is blocked.
I am developing a website and I don't want to tell users how to setup their popup blocker. I wish to find a way to get around this problem. Does anyone know how to allow a child window use it's parent window's form to do a submission/post to target "_blank"? without being stopped by IE7 pop-up blocker?
|
|
|
|