|
Yes, I didn't what to do an ActiveX control but either way it is a client side solution.
thanks for your input.
|
|
|
|
|
|
Hi all
I am using ASP.NET 3.0 and I have a list box in content page. I am using Master Page architecture. I am binding data from the database into the listbox. but it gives me error of "object reference not set to an instance of an object". This is what I am doing..
((ListBox)(this.FindControl("ctl00_ContentPlaceHolder1_lMondayFD1"))).DataSource = ds.Tables[0].DefaultView;
Please guys any one can help me
|
|
|
|
|
Are you able to find other controls at the same place ?
OR can you try like below :
Note: Be sure if your Listbox control defined in Content Place holder
ContentPlaceHolder mpContentPlaceHolder;
ListBox lb;
mpContentPlaceHolder = (ContentPlaceHolder)Master.FindControl("ContentPlaceHolder1");
if(mpContentPlaceHolder != null)
{
lb=(ListBox ) mpContentPlaceHolder.FindControl("yourListboxid");
if(lb!= null)
{
lb.DataSource = ds.Tables[0].DefaultView;
}
}
OR In case List box placed on Master page then use try like this:
ListBox lb = (ListBox ) Master.FindControl("yourListboxid");
if(lb!= null)
{
lb.DataSource = ds.Tables[0].DefaultView;
}
Parwej Ahamad
R & D with IIS 5.0/6.0
modified on Friday, June 6, 2008 11:59 AM
|
|
|
|
|
Background:
We are using .NET 2.0 with the MS Ajax Extensions and the Ajax Toolkit. I'm using the Ajax ModalPopupExtender extender control to create modal popups on a page. I am using a custom datepicker control that uses javascript to pop up a calendar, and populates the textbox with the date selected.
Problem:
It seems that Javascript gets confused with the z-index of the popup. When used on a non-ajax popup panel, it works flawlessly. But, when it is placed on a modal popup panel, the javascript popup calendar is shown behind the modal form. Since the main form and the panel that is controlled by the modal popup are essentially the same form, the control cannot distinguish that its z-index should be set differently.
Failures:
I've tried moving the panel to the beginning of the page.
I've tried setting the z-index of the page to a high number
I've tried setting the z-index of the panel to 0 and 1
I've rechecked the code to verify it is not setting the z-index internally.
Any help on finding a solution to this problem would be greatly appreciated.
|
|
|
|
|
try to put an iframe under your custom calendar.
|
|
|
|
|
I'm looking for a way to make an applet communicate with the same aspx page it was loaded from and not a new one. Using the http protocol I'm able to connect the applet to the aspx, but it is a different one and I need to be the same since every aspx contains diferent information (data members).
|
|
|
|
|
Hi
Im trying to connect to sql server database through asp.net
The connection string works when connecting through access front end
But it doesnt work when connecting through .net, it says the credentials are not correct
any help would be great
thanks
We are not a Code Charity
|
|
|
|
|
If you are using a trusted connected then you have to remember that your ASP.NET application runs as a different user to you. So, when you connect using the wizard in Visual Studio you are using your credentials. When your applications runs then it is using the credentials of the ASP.NET process (normally NT AUTHORITY/NETWORK SERVICE). You have to give permission to that account in your SQL Server.
|
|
|
|
|
i ahve done the following:
connected through .net to another database in the same server
used the same crdentials
checked the username
tried a different username
i can connect through access but not .net
i cant connect but i dont know why...grr!
thanks for the reply
We are not a Code Charity
|
|
|
|
|
i have used an update panel on login page...its working fine on local but when i upload my page on net...its not working fine....the page is refreshed on every click of button....the code is..
<form id="f1" runat="server">
<atlas:ScriptManager ID="scriptmanager1" OnAsyncPostBackError="ScriptManager1_AsyncPostBackError" runat="server" ScriptPath="./Script" EnablePartialRendering="true">
</atlas:ScriptManager>
<div style="padding-right:30px;">
<atlas:UpdatePanel ID="upd1" UpdateMode="Conditional" RenderMode="Inline" runat="server">
<ContentTemplate>
<table width="50%" border="0" align="center" cellpadding="5" cellspacing="0" class="table">
<tr>
<td class="td" colspan="3" style="color: red">
<asp:Literal ID="ltrmsg" runat="server"></asp:Literal>
<asp:Label ID="lblmsg" runat="server"></asp:Label></td>
</tr>
<tr>
<td class="td"><strong>User ID </strong></td>
<td width="39%" class="td"><input name="user_id" type="text" class="form" runat="server" id="user_id" maxlength="20" /></td>
<td width="15%" rowspan="2" class="td"><input type="image" src="login.jpg" runat="server" name="Submit" value="Submit" id="Image1" onclick="return validForm();" onserverclick="Image1_ServerClick" tabindex="2" />
</td>
</tr>
<tr>
<td class="td"><strong> Password</strong></td>
<td class="td"><input name="pass" type="password" runat="server" class="form" id="pass" maxlength="20" tabindex="1"></td>
</tr>
</table>
</ContentTemplate>
</atlas:UpdatePanel>
</div>
</form>
but when user enter wrong user-id or password its not showing the msg in literal ...and the page is refreshed on every click please help me
|
|
|
|
|
Hi!
I'm newbie in ASP.NET world, but I read a good book about it.
My question is:
I have a web page with some controls, like text boxes, drop down lists and so on.
I'd like when an user change any data in any control, and then he/she try to close the browswer or try to leave the web page without save the data, it appear a message box warning that he/she will lose the changes.
Do you have any idea?
Thank you in advance.
--
[Adrián Córdoba]
|
|
|
|
|
Check this out:
http://www.eggheadcafe.com/articles/20010406.asp[^]
Tip: When you type into the CodeProject forum textbox and click back button, this warning comes. :)
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
All the world's a stage,
And all the men and women merely players.
They have their exits and their entrances;
And one man in his time plays many parts... --William Shakespeare
|
|
|
|
|
I am developing one web application using asp.net(vb.net), in this application, I have to display excel,word,powerpoint and pdf files in my browser but restrict the user to save that file and also disable cut,copy,paste,mouse right click and print options.
Please help me out ASAP from this problem.
Thanks
|
|
|
|
|
I believe these options are configurable whilst writing a PDF file but I don't think Office documents give those flexibilities/facilities.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
All the world's a stage,
And all the men and women merely players.
They have their exits and their entrances;
And one man in his time plays many parts... --William Shakespeare
|
|
|
|
|
I have a single webserver using win 2k8 and IIS 7 that is not on a web farm. For one particular page I keep getting one of these 2 errors when any event is executed on the page
Most of the time it is the viewstate error.
This error only happens in Internet Explorer 6 and 7.
I have used firefox and safari and everything works just fine it only happens in IE.
I have a chack box list and a couple of drop down lists on my page as well as a gridview etc.
I tried changing the machine key to no avail so i changed ot back to auto generate
I had read an article where you coudl store viewstate as a session but was not sure how to do that in VB.net
Any ideas how I can correct this?
Thanks
Here are the errors
Viewstate verification failed. Reason: The viewstate supplied failed integrity check.
Forms authentication failed for the request. Reason: The ticket supplied has expired.
|
|
|
|
|
One possible cause is that your asp.net pages are not inheriting from System.Web.UI.Page, i had that problem when i converted to .net 3.5, but i've never used IIS7 or win 2k8, so i'm afraid i cant be more help.
Alcohol the cause of and solution to all of life's problems.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
that not it i have inherits system.web.ui.page
|
|
|
|
|
Hi i wanted to ask did you find a solution?
Kind Regard
Charles
|
|
|
|
|
I have problems to show images in a datagrid. I was looking for some answer and I found that if I use this code it should be work.
Dim Comm As New OleDbCommand(QPhoto, con.Con)
Conexion.Open()
Dim OledbRead As OleDbDataReader
OledbRead = Comm.ExecuteReader(CommandBehavior.CloseConnection)
Do While (OledbRead.Read)
Response.ContentType = OledbRead.Item("IDArti")
Response.BinaryWrite(OledbRead.Item("Image"))
Loop
con.Con.Close()
But, unfortunatelly it doesn't work. When I try to run this code, it asks me if I want to open or save and the both options don't do anything.
Could you help me?
I have the images in Access database and I want to display them in the datagrid with the information of each row
Please, help me I'm stressed out
|
|
|
|
|
|
I have two web pages , i am navigating from page1 to page2 with a query string . The problem is i don't want to show the query string value in the address bar , it leads to database hacking.
How should i overcome this problem ?
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|
|
make another page, page a for now, a basic html page with a frameset that loads page 1, make page a the default page on the webserver and all they will ever see is whatever you call page a, but they'll interact with page 1 and when you navigate to page 1 to page 2 the address bar wont change and if you set the frameset up correctly no one will ever notice it. you could also put your querystring values into the session or viewstate and pass them that way.
Alcohol the cause of and solution to all of life's problems.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
i have four javascript functions three of them are called on mouse over of image control and one when page is loaded first time. it works fine on aspx page but when i use same code with content page (means by applying master page on aspx page) it does not work plz help.
code is given below
Javascript functions
<script language="javascript" type="text/javascript">
var Imag2=null;
var Imag3=null;
var Imag4=null;
var Pnl1=null;
var Pnl2=null;
var Pnl3=null;
window.onload = function()
{
Pnl1 = document.getElementById('Panel1');
Pnl2 = document.getElementById('Panel2');
Pnl3 = document.getElementById('Panel3');
Imag2 = document.getElementById('Image2');
Imag3 = document.getElementById('Image3');
Imag4 = document.getElementById('Image4');
Pnl1.style.display = 'block';
Pnl2.style.display = 'none';
Pnl3.style.display = 'none';
Imag2.style.display = 'none';
Imag3.style.display = 'block';
Imag4.style.display = 'block';
}
function Panel1(Image)
{
Pnl1.style.display = 'block';
Pnl2.style.display = 'none';
Pnl3.style.display = 'none';
Imag2.style.display = 'none';
Imag3.style.display = 'block';
Imag4.style.display = 'block';
}
function Panel2(Image)
{
Pnl1.style.display = 'none';
Pnl2.style.display = 'block';
Pnl3.style.display = 'none';
Imag2.style.display = 'block';
Imag3.style.display = 'none';
Imag4.style.display = 'block';
}
function Panel3(Image)
{
Pnl1.style.display = 'none';
Pnl2.style.display = 'none';
Pnl3.style.display = 'block';
Imag2.style.display = 'block';
Imag3.style.display = 'block';
Imag4.style.display = 'none';
}
</script>
|
|
|
|
|
Use View Source in the browser, and you'll see what id the elements really have.
You can use the ClientID property of a server control to find out what id it will get in the rendered page.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|