|
Member 2528846 wrote: I am Facing problem in updating values using Gridview Please help me if you can
It's tough to tell what would be the problem as you haven't explained anything. Explain your problem in detail to get help.
|
|
|
|
|
I need to get file name and file create date from one of Virtual directory of IIS. One problem is each virtual directory is mapped to actual directory of network drive. How can I get file list from virtual directory? anyone can help me out please?
|
|
|
|
|
Use Server.MapPath[^] to convert a virtual path to a physical path. Then use the stuff in the System.IO namespace to obtain details about all files in a directory and individual file information.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Ok so I've been through some of the articles, had a rat through ASP.Net and solved most of the problems. Heres how it stands
I have a gridview gvProducts with autogenerate colums (I just want to see the data first)
I am using a ObjectDataSource which conforms to the required structure with Start & Max row parameters and rowcount etc.
The object returns a table, the grid displays the header text for each column but the is no data.
I have tested the proc (SQL 2005), debugged through the code and the proc returns a table with the required 19 rows, the object returns a populated datatable. The bloody grid won't show the data, only the header text.
The ASP Code
<asp:gridview id="gvProducts" runat="server" allowpaging="True" autogeneratecolumns="true" datasourceid="dsProduct" enablesortingandpagingcallbacks="True" pagesize="19"><br />
<pagersettings mode="NextPrevious" /><br />
</asp:gridview><br />
<asp:objectdatasource id="dsProduct" runat="server" selectmethod="GetPagedForGroup" typename="CSD.OurLibrary.clsProduct" enablepaging="True" selectcountmethod="GetRecordCount" startrowindexparametername="iRowIndexFrom" maximumrowsparametername="iMaxRows"><br />
<selectparameters><br />
<asp:sessionparameter defaultvalue="1" name="iGroupID" sessionfield="GroupID" type="Int32" /><br />
<asp:parameter name="iRowIndexFrom" type="Int32" defaultvalue="0" /><br />
<asp:parameter name="iMaxRows" type="Int32" defaultvalue="19" /><br />
<asp:sessionparameter defaultvalue="" name="sFilter" sessionfield="Filter" type="String" /><br />
</selectparameters><br />
</asp:objectdatasource>
|
|
|
|
|
I never use this objectdatasource stuff, but I assume GetPagedForGroup is a method that gets called. Have you set a breakpoint to see if it gets called and waht it returns ?
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'm just starting to do some ASP work so it is a bit of a curve!
Christian Graus wrote: GetPagedForGroup
This calls to the database and returns a datatable, and yes I have set the break points and it is working fine, the table is populated and the method returns it to the page.
As the grid actually displays the colums as the header text I assume it is working OK, I feel it is a setting on the gridview I have screwed up. Hence the minimisation of the formatting etc.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
OK - what if you get rid of this object thingy, and instead call your data layer from code and assign a datasource/databind the control ?
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 )
|
|
|
|
|
Yep - works perfectly, gets the 19 rows, binds and displays the records.
|
|
|
|
|
Ok - got over the nth hurdle, the objectdatasource had enablepaging set to true.
Now to make it to as its told
Wrong problem - enable paging turned off the requirement for recordcount.
The root cause of the error was that I was returning a table for record count instead if an integer.
Changed the extract to ExecuteScalar and solved the problem. Last modified: 18mins after originally posted --
|
|
|
|
|
Hi guys, I have a recent project at work that requires me to work on a Search Engine that can do searching within the web application. I have no experience with it and it's proving to be quite a challenge.
Can someone point me in the right direction where I can find solutions/answers to how to design and create a search engine for an ASP.NET web application?
If You Can't See It By Faith, You Ain't Gonna Have it!
|
|
|
|
|
Google[^]
only two letters away from being an asset
|
|
|
|
|
Google is a good answer If the site is online, I'd tend towards using the site: feature of google to generate my searches.
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 )
|
|
|
|
|
We use MS Indexing Service to catalog our sites and search the catalog using VB ASP.Net. Works well.
Do a google on indexing service.
|
|
|
|
|
How do I store a text that contains < >s? ASP.net doesnt allow me to send these to the server? How is it handled usually? By replacing the tags with some symbols and changing it back to tags code behind, before using it?
|
|
|
|
|
The same way it's done in these forums. ASP.NET has nothing to do with it, it's all the browser. You do this to get a < - <. You use gt for greater than and amp for an ampersand.
Note: this reply contains my response encoded for viewing in the browser, if you got it in your email, you need to view it in the forum to see the proper format.
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 )
|
|
|
|
|
Hi ..
I am bulding a mobile application in which I want to show Objectlist control bound datasource filled using the database. i am able to display data fetched from the database but I also want to refresh the objectlist periodically. What should I do to accomlish this task?
Thanx in advance...
Gurudatta B. Shelke
|
|
|
|
|
Seeing as your question relates to mobile development, wouldn't it be better to post it in the 'Mobile Development' forum?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
I started getting this warning when I compile, and I'm not sure why. How do I resolve it?
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\hlgic\044e400f\ef2ff56\App_Web_e-brrj2m.8.cs(128,49): <br /> warning CS0436: The type 'css_Default' in <br />'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\hlgic\044e400f\ef2ff56\App_Web_e-brrj2m.8.cs' <br />conflicts with the imported type 'css_Default' in <br />c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\hlgic\044e400f\ef2ff56\App_Code.sfagqmde.dll'. <br />Using the one in <br />'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\hlgic\044e400f\ef2ff56\App_Web_e-brrj2m.8.cs'.
Things I've done recently (since yesterday) that I think might have prompted these warnings to start appearing:
1) Added a default.aspx/cs page to each sub-folder to prevent someone from browsing them. Is there a better way to do this?
2) Changed a library DLL, and then re-added a reference to it.
Anybody have any clue about this?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I've seen the temporary files go a bit wacky at times. Clear the temp folder listed and it should be fine.
As for preventing browsing, add entries in the webconfig
<location path="SubFolder">
<system.web>
<authorization>
<deny users="*"/>
</authorization>
</system.web>
</location>
only two letters away from being an asset
|
|
|
|
|
If I put that in the web.config, the sight can't get to the files it needs (in this instance, it's a folder called "css").
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
So you want to protect css files from being accessed? Just trying to understand what you're looking to do.
only two letters away from being an asset
|
|
|
|
|
Noooo... I want to prevent people from browsing the folder itself. In other words, if they enter http://blah.com/css in their browser, I don't want them to see a directory listing. Right now, the way I'm doing that is to create a Default.aspx (and Default.aspx.cs) in the folder that redirects them to the root Default.aspx.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
AFAIK, IIS having this option. But you are using APACHE to run ASPX pages, Right ? I got this[^] result when I googled it. Also if none of them are working, I think putting default page would be the only option.
|
|
|
|
|
Hello Friends,
I'm using a div to update the information of an user but as i click on the save button it updates the information but also hide the div. But div should not be disappeared.......
|
|
|
|
|