|
Does anyone have an anwer to this problem? It seems to me that there is a timing issue involved here since the textbox updates but the image does not. Surely I am not the only person that has tried to update a imageurl in an updatepanel? This seems that this should be straight forward using updatepanels, so is there a problem with updatepanels and timing of triggers?
|
|
|
|
|
|
Th javascript someone gave you last time you asked, a matter of minutes ago, looks fine to me. how about sticking to one thread and asking further questions if you can't work out what to do with the answer you were given ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I'm working with a Repeater control in asp.net.
I added a server control to the Repeater's Header Template.
I'm trying to get a reference to that control programmaticaly, can't figure out how to do that. Is it not possible?
Thanks.
|
|
|
|
|
You need to look for it inside the repeater, with FindControl, I guess.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Looks like the first control in the Controls collection is the RepeaterHeaderItem, it can be found there with FindControl.
Won't finding the the Items collection.
Thanks for the reply.
|
|
|
|
|
Hi~
I have a user control with a gridvew that contains a checkbox and textbox. The textbox is set to Enabled=false by default.
On Page 1: the Header of the checkbox column is "Remove" and there is a Save button. On this page I need all UNCHECKED rows to have an enabled textbox
On Page 2: the Header of the checkbox column is "Select". On this page I need all CHECKED rows to have an enabled textbox and all others to be disabled.
How do I create the javascript for these requirements? I am using asp.Net and C#.
Here is my sample code:
UserControl.ascx:
<asp:gridview xmlns:asp="#unknown">
<asp:templatefield headertext="Select">
<itemtemplate>
<asp:checkbox id="chkBox" runat="server" checked="<%#Bind(" />
</itemtemplate>
</asp:templatefield>
<asp:templatefield headertext="Size">
<itemtemplate>
<asp:textbox id="txtSize" runat="server" text="<%#Bind(" size=")%>" readonly="false" enabled="false" enabledviewstate="true"> </asp:textbox>
</itemtemplate></asp:templatefield></asp:gridview>
Current JavaScript:
function CheckChanged(cb, tb)
{
var chkBox=document.getElementById(cb);
var txtSize=document.getElemetnById(tb);
if(chkBox.checked)
{
txtSize.disabled=true;
txtSize.style.backgroundColor=\"lightgray\";
}
else
{
txtSize.disabled= false;
}
}
This javascript is getting written via a StringBuilder in the .aspx.cs file of each page. Currently, I can only get the script to work properly for Page 2. On Page 1, I need the textbox to always be enabled unless something is checked. What is the best way to enable the textboxes on this page?
Thanks!
modified on Wednesday, February 25, 2009 9:39 AM
|
|
|
|
|
Can you use an ajax solution to post back and enable / disable all of the controls in server side code?
Otherwise, your best bet is to create a public static string property in server side code such as textBoxIds. On the item databound event of your grid,
set
<br />
textBoxIds += (textbox)row.findcontrol("txtbox").clientId + ",";<br />
Then add javascript to iterate your comma separated string on client.
<br />
<br />
var textBoxIds = '<%= this.textBoxIds %>';<br />
<br />
<br />
var Ids = textBoxIds.split(',');<br />
for (var i = 0; i < Ids.length; i++) {<br />
var tb = document.getElementById(Ids[i]);<br />
if (tb != null) {<br />
tb.disabled = true;<br />
}<br />
}<br />
Good luck.
I didn't get any requirements for the signature
|
|
|
|
|
Would the ajax solution be better to use? I am not familiar with ajax so I am not sure how to do this.
Thanks.
|
|
|
|
|
|
Thank you all for helping me. Also, ToddHileHoffer, thanks for posting the link.
|
|
|
|
|
Hello Experts,
In populating a DataGrid a couple options include (but not limited to):
- use of a Typed DataSet
- use of a Custom Collection of Objects
From some reading, one of the (apparent) drawbacks of a Typed DataSet is performance. One alternative is to use Custom Collections instead.
Has anyone done any benchmarking on this issue (of populating a Gridview using Typed DataSet VS Custom Collection)?
“You will never be a leader unless you first learn to follow and be led.”
–Tiorio
"Coming together is a beginning, staying together is progress, and working together is success." Henry Ford
|
|
|
|
|
Mogaambo wrote: Has anyone done any benchmarking on this issue (of populating a Gridview using Typed DataSet VS Custom Collection)?
No. But I never use either. I just use a regular data table, seems easy and efficient.
I actually used to make entity classes and use generic lists. I've also messed around with LINQ to SQL and the Entity framework, but I have reverted back to simply using data tables for ease of coding / maintainability.
If you are interested in benchmarking, try using this tool. http://www.jetbrains.com/profiler/[^]
It is great and you can do your own tests to see what works best for your situation.
I didn't get any requirements for the signature
|
|
|
|
|
How can I make software lock ( or Activation Code) for web applications ?
Your prompt reply will be appreciated …
regards
|
|
|
|
|
Given that it needs to be hosted on a machine connected to the internet, it's actually pretty easy. But, the hard part is, I am not sure if you can package your code in a dll in the newer versions of ASP.NET. If you ship your code, people can obviously change it, although your business tier could enforce activation, then all you're giving away is your UI.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
is it possible to use vb.net form inside asp.net to commiunicate with db.
|
|
|
|
|
|
varsha dixit wrote: no
LOL.
Edit. I misread the original question. I thought he asked if he could use VB.Net to communicate with a database.
I didn't get any requirements for the signature
modified on Tuesday, February 24, 2009 2:50 PM
|
|
|
|
|
that is funny, i misread it as
is it possible to use vb.net from inside asp.net to commiunicate with db.
Yusuf
|
|
|
|
|
Yeah, I did the same.
I didn't get any requirements for the signature
|
|
|
|
|
I recommend reading the forum guidelines. How is ASP.NET as good subject ?
Also, the answer is maybe, but it would be a stupid thing to do.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Is there a way to open the MDB file in the browser and be able to edit it?
|
|
|
|
|
No, not directly...an .mdb is a database file, its binary. You need to attach that database to a SQL Server instance, such as SQL Server 2005 Express, and query it to retrieve and display data.
|
|
|
|
|
Or open it in Access, right ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Sure, you could open it in access. Not exactly sure how that will get it visible on the web, however.
|
|
|
|