|
If I set autopost back to false then it is not catching the even when I change the selection from yes to No radio button.
|
|
|
|
|
In case of Auto postback false selected index change will not fire.
|
|
|
|
|
this is exactly what is happening. it is not firing the event when I change No to Yes on radio button options
All I want is that when the option is changed show two textboxes or not.
thanks
|
|
|
|
|
|
I have an ongoing debate with a co-worker about the merit of using server controls or code-behind for data, and I thought I'd post here for other people's opinions. I use SqlDataSources bound to controls, whereas he puts labels on the page and does everything in the code. (Oh, and I use stored procedures and not text commands, which I feel suffices for a DAL in small apps, so let's skip that argument.) I like it because it seems cleaner, faster, more concise, and gives access to the control events so work can be done at the appropriate time. Which do you prefer and why?
|
|
|
|
|
Using controls such as SqlDataSource is faster in some respects, however, it does not suffice as a true DAL, not even with stored procs. (Its an argument you will loose 9 out of 10 time). This method binds the presentation to data much too strongly for me. You should be able to build the application so each layer is independent.
I would say you are both right to a certain extent. The co-worker who is building everything by hand is going too far. DataBinding and templates can be used quite effectively. Separating the presentation and data, such as in a MVC or MVVM pattern gives much more flexibility and code reuse.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
|
Are this labels put on the form only once at the beggining of the page "lifecycle"? If yes - then declarative way would be better for traffic. Because each change of the page, which occurs in OnLoad() method is added to ViewState and travels to client with html page. If labels will be defined in .aspx then they will be created on Init() step and there will no additional ViewState data
|
|
|
|
|
does anybody use pdfbox? It is built into an application that I just inherited and suddenly has an Index was outside the bounds of the array. error. Now I do know what that means generally, however the debugger does not show me where its screwing up as it is withing pdfbox itself not part of the application code in and of itself. Its on a line call that has worked for over a year. No code has been updated, no servers have been updated(in regards to this app)
The application as a whole goes to a outside party website and pulls down a pdf file, that part works fine. It then used pdfbox to strip particular text out of that pdf file and puts that into a database. The text strip is where things have suddenly gone wonky.
My only thought so far is that the format of the pdf has been changed somehow but I cant tell where and again, its third party as well. So if anybody uses this particular tool and has had this issue in any way, a little hint of the right direction would be helpful.
Programming is a race between programmers trying to build bigger and better idiot proof programs, and the universe trying to build bigger and better idiots, so far... the universe is winning.
|
|
|
|
|
Hello,
I have a gridview, grid1 on the page which loads using the SqlDataSource, all the code is on the same page, the connection string, insertcommand etc. Everything is good and results display.
now, I have given the users the option to search. I want to bind the search results to the same grid1, the results would look the same except filtered on search criteria. When I try to use the same sql connection it comes back with WebControls.SqlDataSource and sqlclient.sqlconnection conversion issue. Is there a way to bind my search results to this grid as well?
Thanks!
|
|
|
|
|
Just used the selectcommand with the new sql select statement and bound the values. it worked well!
|
|
|
|
|
Dear All,
How can i clear the textboxes ofter a postback. I tried it with code below, but it doesn't work:
ViewData.ModelState.Remove("txtPassword");
Thanks in advance.
|
|
|
|
|
ViewData.ModelState.Clear(); ?
Sorry I can't test this, I'm in the middle of and installation at the mo'.
|
|
|
|
|
Hi Keith,
Thanks for your response.
But unfortunately it does'nt work.
|
|
|
|
|
|
Why don't you try setting that text box to empty something like -- txtBoxPassword.Text = "";
|
|
|
|
|
Hi all,
Does SiteMapNode property 'Roles' must provide for each Node those contain childNode ?
Because of if I do not add 'Roles' at SiteMapNode and set securityTrimmingEnabled="true" at webconfig.
Some SiteMapNodes those have childNode are not showing in menu.
Is there any way to show menu without provide 'Roles' to each SiteMapNode and just show menu as Admin user have defined Access rule for particular Role?
My purpose is when admin user create new Role and Access rule I don't want to manually add that new Role in sitemap file.
Thanks to all 
|
|
|
|
|
while Redirect the page, Page_Load is not calling after hosting the application to IIS. when using the visual studio is calling ... i made like these..
Base class which has inherit Page
public partial class BasePage: Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
Our page Inherit BasePage
public partial class MainPage : BasePage
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
Now calling from Another page
Response.Redirect(MainPage.aspx)
The Mainpage calss Page_Load is calling whilw running Visualstudio app. But after hosting to the IIS The Page_Load is not called
Please help me
Thanks
|
|
|
|
|
Something needs to trigger for this redirect to take place. Maybe you can have a javascript that this code inside page_load? Hope this makes sense.
|
|
|
|
|
Hello all,
I am trying to get the file path which I choose to upload. I mean the value of the textbox of the file upload control. With this code:
fUploadcheckpayment.PostedFile.FileName I just only get the file name not the path. I tried
Server.MapPath(fUploadcheckpayment.FileName) and that didnt work either. I get a path of my project. Any ideas how i can do this?
To be more clear what I am trying to do:
When the user uploads a file I rename the file and save it to a folder. After saving it to the folder I want to delete uploaded file from its original source. Such as the user upload the file from its desktop. I save the file to a folder udner C://Folder name. I want to delete the file from the desktop.
modified on Tuesday, April 26, 2011 5:59 PM
|
|
|
|
|
As you are talking about uploading files, I am guessing that this is an asp.net project. If it is you cannot access the users desktop from the brower. It is a security risk. The browser will allow you to read files to upload only. The only way you could achieve this is using flash or a browser plugin that is not constrained but the browsers security sandbox.
Hope this helps.
|
|
|
|
|
Yes it is a ASP.net project. Seems like securty issues preventing me to do this I will search what you have offered thanks for the suggestion though
|
|
|
|
|
|
I tried this but it reads only the file name not the full path 
|
|
|
|
|
I think it's not possible since this is a standard security precaution.
Ignorance of the ability brings disability.
|
|
|
|