|
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?
|
|
|
|
|
the parent window contains the main form with all the hidden input elements for posting & also correct URL, etc. the child windows know nothing about the URL nor does it have any forms of it's own. the child window would call the parent window's form to submit... to OpenDoc.asp to open a new child window. I do not want the child window to open another child window within itself. Only the parent window should be allowed to open many child windows.
Get what I mean?
I even tried writing a auxillary function in the parent window to openDoc()... and the child window calls this openDoc in the parent window. But this still gets blocked. It's like as if IE7 knows the original caller.
|
|
|
|
|
|
Hi,
How can I calculate the size of the parameters that I supply to a web service method?
thanks,
- ferudun
|
|
|
|
|
ajax control not working properly while visibile control is false
parthiban
|
|
|
|
|
Try reading the guide on how to ask questions. What control ? Is it a server control ? If it's not visible, it may not even be on the page, and even if it is, what do you expect it to do ?
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 )
|
|
|
|
|
you can't. XML is a format for text data. It can contain an image, in a CDATA section, but unless the XML is also HTML and contains an img tag, and is shown in a browser, an XML viewer is never going to show an image, it's going to show the text inside the XML. Even then, you need an img tag to an external image, not to any image inside the XML
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 want to display only xml data without tags in iframe .
|
|
|
|
|
srinivas431 wrote: i want to display only xml data without tags
Which tag are you talking about??
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
i created an xml file.it contain some information.i.e
<title>hello
hai fjshfdf dsjfjdf fndfidjf hfsdifhs shfsiof fhdsfhsf sfhdsfh
i want to display the xml information in "IFRAME" .IT SHOULD DISPLAY ONLY INFORMATION BUT NOT TITLE,P TAGS.
|
|
|
|
|
Use the "Ignore HTML" option when you post markup code.
To display xml, you use an xsl transform to transform it into an xhtml document.
Introduction to XSLT[^]
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
srinivas431 wrote: hai fjshfdf dsjfjdf fndfidjf hfsdifhs shfsiof fhdsfhsf sfhdsfh
We understand 'hai' is a variant of 'hi'. But what is that series of strings that is following it? Any base64 encoded?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|