|
I have two dropdownlists. on change of first dropdownlist javascript function is called inside which another dropdownlist is disabled. But when the selectedindex changed of first dropdownlist is called second dropdownlist is not disabled.
How i can disable the second dropdownlist.
Life is Beautiful
|
|
|
|
|
Have you debugged through this to see what is not happening?
|
|
|
|
|
Hi,
I have an application where when a user sign off and then hits windows back button it is navigating to the previous page in the authenticated space. But i want that the user should not be allowed to navigate to authenticated space but instead show an error message. for that i am thinking that I might need to refresh the browser acche. Any ideas on how to do that.
Any other possible solutions are also welcome
|
|
|
|
|
Try this
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Response.Expires = 0
|
|
|
|
|
I m using Menu Control. there are two cases when user clicks on any menu item.
1. it redirect to the pages in same domain.
2. It redirect to other website.
case 1 is working fine but in case 2 its opening the url in same domain. (under project name).
for example, if project name is MyProject.
In second case, when I click the menu item, I should redirect to "www.website1.com". But instead of this, I'm getting MyProject/www.website1.com.
Tnx in adv.
Balasubramanian K.
|
|
|
|
|
BalasubramanianK wrote: In second case, when I click the menu item, I should redirect to "www.website1.com". But instead of this, I'm getting MyProject/www.website1.com.
where is that section ? please put that.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Thanks Abhijit.
digimanus reply helped me. Thank you
Balasubramanian K.
|
|
|
|
|
you might add http:// before your www......
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
Yah.. It is working now. Thank you very much.
Balasubramanian K.
|
|
|
|
|
|
I didn't understand the which communication layer are you using. Are you just trying to connect with Database with your windows service? Isn't it.
if yes, you can connect. But <code>not using</code> the Configuration you have provided</b>.
Try to read out about ConnectionString and AppSetting section of App.config file.
One sample from you
<configuration>
<appsettings>
<add key="DBConnectionString" value="Data Source=myserver;Initial Catalog=MyDB;User ID=sa;Password=password@123" />
</appsettings>
</configuration>
Now read the key value using ConfigurationManager class.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Hey guys, this question is out of curiosity.
What is the difference between querying, inserting, updating or deleting data in your database from the codeBehind than from a WebService?
I've been taught to do data access in the WebService and thats what i do, but the only reason as to why i can come up with is if you have a routine like NotifyWebMaster(Message); you dont have to replicate that code in every .cs file you want to access it from.
Are there any other reasons?
Harvey Saayman - South Africa
Software Developer
.Net, C#, SQL
you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111
|
|
|
|
|
hi Harvey
I assume if you say Code behind, you are talking about behind a form(Windows) aspx(Web). cool Good Question. Its not a Good idea or a good Practice to write your database work in your Forms or Pages code behind. Especially me, i don't do my database work using wizards. i create a DAL(Data Access layer) and a BLL(Business Logic Layer). Now all your pages or forms as you said will call one function that you have a function repeated in all the pages as you said. If you taught to write your data access layer in your Web Service, its good and its a good Practice. but i Prefer DLL's than web services. but it all depends on your and the Application you are writing.
Thanks
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
www.ITS.co.za
modified on Thursday, March 19, 2009 10:28 AM
|
|
|
|
|
Hi Vuyiswa,
Good Answer. It always better to developed own BLL and DAL for Business and Database Access respectively, and its a very good practice.
Vuyiswa Maseko wrote: If you taught to write your data access layer in your Web Service, its good and its a good Practise. but i Prefer DLL's Smile than web services.
Exactly. When you will choose web service or when to use dll that totally based on your requirement.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Thank you
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
www.ITS.co.za
|
|
|
|
|
Harvey Saayman wrote: What is the difference between querying, inserting, updating or deleting data in your database from the codeBehind than from a WebService?
Nothing much. Webservice is isolated and you can change it without recompiling your application.
Harvey Saayman wrote: I've been taught to do data access in the WebService and thats what i do,
It depends on your requirement. I don't recommend using webservice for all your data access. You get better performance if your application is accessing the DB directly than from a web service. You need a webservice only when multiple subcribers are using it or you want to expose some APIs to the outside.
|
|
|
|
|
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.Cells.Count > 0)
{
strGridValue = e.Row.Cells[0].Text;
if (strGridValue != "ID")
{
e.Row.Attributes.Add("ondblclick", "javascript:alert('" + strGridValue + "')");
Session.Add("Value", strGridValue);//This Line of code will work here?
Response.Redirect("Default.aspx");//This Line of code will work here?
}
}
}
This code is not working....Please help...
|
|
|
|
|
which code is not working ... Javascript alert or Response.Redirect.
I think if you redirect, why do you need to attach client attribute ??
|
|
|
|
|
Sr...Frank wrote: protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.Cells.Count > 0)
{
strGridValue = e.Row.Cells[0].Text;
if (strGridValue != "ID")
{
e.Row.Attributes.Add("ondblclick", "javascript:alert('" + strGridValue + "')");
Session.Add("Value", strGridValue);//This Line of code will work here?
Response.Redirect("Default.aspx");//This Line of code will work here?
}
}
}
Did you tried to debug it?
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
HI,
What was error it was showing..?
|
|
|
|
|
Hi all,
Following are my sceanarios :
1. I am opening a popup window through showmodaldialog() method and made some changes through the popup window and save the data and close the window.
2. When I open the popup window in edit mode then the changes doesnot reflect for first time but after onwords the changes are reflected.
3. To solve this problem I have used the following codes but it doesnot work.
<meta http-equiv ="CACHE-CONTROL" content="no-store, must- revalidate,private,no-cache"/>
<meta http-equiv="Pragma" content="No-Cache"/>
<meta http-equiv="Expires" content="-1" />
Please Provide Some Solutions for the above issue......
Thanks & Regards
Bikash
|
|
|
|
|
Sounds to me like you're binding to data in page load instead of prerender, so you bind to data before it's updated.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
hi
my menu is on masterpage.my contentpage has a dropdown list.according to
value selected in dropdownlist my should be populated.i am sending the code
please help me fast
cmd = new SqlCommand(sql,conn1);
dr = cmd.ExecuteReader();
Master.Pr.ChildItems.Clear();
while (dr.Read())
{
MenuItem mi = new MenuItem(dr["Actionname"].ToStrin());
Master.Pr.ChildItems.Add(mi);
}
pr is property through which i m getting menu control.
|
|
|
|
|
naveen attri wrote: please help me fast
Why ?
I'm not sure that I even get what your issue is ? What is this code doing ? What's going wrong ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
hi
actually my menu control is on master page.i m trying to populae it from
cild page.
on chid page i have a dropdown list.
on DropDownList1_SelectedIndexChanged I am trying to access the master page menu control.and then trying to populate it.but it is not populating.
but if i m trying from pageload of child page.then it is working.
but i want that it should work on DropDownList1_SelectedIndexChanged.
|
|
|
|