|
|
Hi,
I want to know how can I refer to a label control placed in m y aspx from an ascx included and registered in the same aspx file?
and vise-versa
Thanks
|
|
|
|
|
Hi,
Try this
Label labelName=this.Page.FindControl("labelName") as Label;
|
|
|
|
|
You can expose your Label as property and access it from page.
But its better pass data to control/page instead of accessing controls.
|
|
|
|
|
Hi..
I use Iframe to display PDF document and then with modelpopup extender to display this iframe.
This works fine if I browse it through Mozilla, but dont work If I go for IE-7.
In IE-7 only Iframe displayed and not the PDF.
Could you guide me, what could be the issue.
thanks,
Hemant
By:
Hemant Thaker
|
|
|
|
|
hi all,
MS SQL server compact edition comes with VS 2008. I made database in that . Now i want to use the same database in MS SQL Server 2008 Express edition
Thanks
|
|
|
|
|
Better if you ask this in Databse forum
|
|
|
|
|
i need to load all countries,states in a drop down, can any one suggest me a good link .
|
|
|
|
|
sathimailin1 wrote: i need to load all countries,states in a drop down
Where from you want to load? from Database or XML file?? specify your question.
|
|
|
|
|
i need to load through sql but for that i need country,city,state data, from where i can get the list to bulk insert.
|
|
|
|
|
|
Good Morning,
I am using the ClientScriptManager class to call a java alert from Code Behind when a condition is not met. This is being done from a page that is already a JavaScript pop up. When the alert is responded to, I want the script to close both the alert AND the page that generated the alert. Everything works as designed until I close the alert window...THEN the user is also forced to close a second page (the original generating page for the alert) to return to the starting point. This seems cumbersome and unprofessional. I Googled a bunch of stuff but cannot seem to come up with just the right one. What I have currently is below. I appreciate any assistance...Thank You, Pat
if (RadioButtonSelect.Checked == false)
{
string msg = "The SORT request is only compatible with the SELECT command";
ClientScriptManager script = Page.ClientScript;
if (!script.IsClientScriptBlockRegistered(this.GetType(), "Alert"))
{
script.RegisterClientScriptBlock(this.GetType(), "Alert", "alert('" + msg + "')", true);
}
ScriptManager.RegisterClientScriptBlock(this.Page, GetType(), "Alert",
"window.close();", true);
return;
}
|
|
|
|
|
I think you need to:
a) give different names to the two Key properties of each script you're registering - adn don't use names that are language keywords (such as "Alert")...
b) add a semi-colon after each javascript statement. Otherwise the two will run into each other (concatenate) on the rendered page and cause an error.
c) I am not an expert in C#, but why is your second RegisterClientScriptBlock statement a different format from the first?
d) Don't know why, but I always prefer self.close(), rather than window.close().
Thus, try:
script.RegisterClientScriptBlock(this.GetType(), "jsAlert", "alert('" + msg + "');", true);
and:
script.RegisterClientScriptBlock(this.GetType(), "jsClose", "self.close();", true);
|
|
|
|
|
PDTUM wrote: script.RegisterClientScriptBlock
script.RegisterStartupScript(...)
RegisterStartupScript is the one you have to use.
|
|
|
|
|
Who says you *have* to use RegisterStartupScript ? It works just fine with RegisterClientScriptBlock ...
|
|
|
|
|
Dear all,
I need your advice in this.
The admin of my site can make some articles with images with the html editor and saves the html into the database.
now i want to show the list of articles with the date added, sender, and a short part of the article(depending on the saved html, this can be text with maybe a image). ofter clicking a article, the user can see the entire article.
my question is, what is the best way to do this? wich control to use to list the articles, and how can i show only a part of the article that can also contain a image in that list ?
Thanks in advance.
|
|
|
|
|
A Repeater or a DataList should be good for what you are trying to do. You just have to define the template with labels, image controls and maybe an html literal control. As far as displaying part of the article, since it is stored as html that makes it much more difficult. Unless you have some standards in terms of how the html is formatted, it will be difficult to pull a html fragment that renders properly. For instance if the article html uses nested divs and you only pull enough text that you leave off the closing div tags it would be a mess.
|
|
|
|
|
Hi T M Gray,
Thank you for the response.
Can you tell me what is then the right and simple way to do this?
|
|
|
|
|
I have different web applications and I want to ask if it's advisable to create a web service to send emails through it so all my web applications will go there instead of having the Mail class or code in every web application...
what do you think?
|
|
|
|
|
Well it depends, are these applications going to different clients? In which case, hell no.
If it's your own personal use...maybe. Again, it depends on what you're doing with these applications. You might be porting these in which case you want them as encapsulated as possible so having an external webservice for doing an email is illogical.
I personally wouldn't anyway, every project is likely to have quirks meaning that you'll need to do customization on a per project with them.
|
|
|
|
|
One idea you may want to think about is to simply create an assembly that contains the mail code and distribute it to each application. Expose an interface for configuration and you have the ability to have a custom mail solution for each without the complexity of an extra layer in the system.
Remember that the more simplicity can be brought into a project, the more likely it is to actually work. (I know you're not a newbie, but I actually have to remind some of our architects of this periodically as well)
|
|
|
|
|
if no company policies, security officers and firewall should have been invented it would be possible
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
I agree with PogoboyMtK.Inspite of having an webservice,you can have a dll that can be used in all the applications, where you need.(If there is not any specific need of webservices, webservices will also not be good from performance point of view.)
|
|
|
|
|
A lot of Applications needs the email functionality that is possibly the same in some cases. The DLL VS Web-services is an easy choice.
DLL
1) DLL every time you make a change you need to compile it and distribute it in all the other Application(lets hope its not 20 like in my case)
Web-service
1) When you make a change in your web service you make it one place and all the other application will get the change.
i have more than 20 Win and web application and i wouldn't want to have a maintenance nightmare. As i said its easy to choose between the two as it is obvously the webservice is the best choice.
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
If you follow the old COM world rules of never altering existing interfaces, just adding new ones if necessary, thereby keeping backward compatibility intact, you can easily distribute the newer versions of the dlls only to the applications affected and it is not necessary to update all the applications all of the time.
I do agree with you that if there are 20+ apps this could potentially become a maintenance nightmare because we all know that in larger companies, junior sustainment devs do "interesting" things when "improving" code they are working on, so the safer, yet more inefficient route would be to use the web service.
|
|
|
|