|
The code you write in codebehind to display the alert
|
|
|
|
|
-----------------This the code which I had written in CommonClass where all my commonly used method stored.-------------------------------------------------
public static void ShowMessageBox(string Message, System.Web.UI.Page p)
{
System.Web.UI.WebControls.Label lblMessageBox = new System.Web.UI.WebControls.Label();
lblMessageBox.Text = "" + Environment.NewLine + " void(showBox('" + Message + "'))";
p.Controls.Add(lblMessageBox);
}
---------------------This is my Code Behind Code--------------------------------
CommonClass.ShowMessageBox(ex.Message.ToString(), this.Page);
By using this code I am calling method present in Common Class.
--------------------------And This Is My Message Box Code Which I had written On Master Page---------------------------------------
function showBox(str)
{
var width = document.documentElement.clientWidth + document.documentElement.scrollLeft;
var layer = document.createElement('div');
layer.style.zIndex = 2;
layer.id = 'layer';
layer.style.position = 'absolute';
layer.style.top = '0px';
layer.style.left = '0px';
layer.style.height = document.documentElement.scrollHeight + 'px';
layer.style.width = width + 'px';
layer.style.backgroundColor = 'LightGray';
layer.style.opacity = '.7';
layer.style.filter += ("progid:DXImageTransform.Microsoft.Alpha(opacity=80)");
document.body.appendChild(layer);
var div = document.createElement('div');
div.style.zIndex = 3;
div.id = 'box';
div.style.position = (navigator.userAgent.indexOf('MSIE 6') > -1) ? 'absolute' : 'fixed';
div.style.top = '200px';
div.style.left = (width / 2) - (400 / 2) + 'px';
div.style.height = '100px';
div.style.width = '400px';
div.style.backgroundColor = 'White';
div.style.border = '4px solid silver';
div.style.padding = '20px';
document.body.appendChild(div);
var myimg = document.createElement('IMG');
myimg.src= "../images3.jpg";
myimg.width= '50';
myimg.height = '50';
myimg.visible="true";
div.appendChild(myimg);
var p = document.createElement('p');
p.innerHTML = str;
p.style.position = "absolute";
p.style.top = '20px';
p.style.fontSize=14+'px';
p.style.fontWeight = "bold";
p.style.left = (width / 2) - (800 / 2) + 'px';
div.appendChild(p);
var btn=document.createElement('Button');
btn.innerHTML='Ok';
btn.style.border='2px solid silver';
btn.style.opacity = '.6';
btn.style.fontSize=16+'px';
btn.style.fontWeight = "bold";
btn.style.border='solid';
btn.style.position = "absolute";
btn.style.top = '100px';
btn.style.left = (width / 2) - (620 / 2) + 'px';
btn.onclick = function()
{
document.body.removeChild(document.getElementById('layer'));
document.body.removeChild(document.getElementById('box'));
};
div.appendChild(btn);
}
|
|
|
|
|
It's a simple update profile page containing a form with loaded value.
Whenever the page is opened those msg are coming.
SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
What should I do to fix this?
|
|
|
|
|
Subarna4D wrote: What should I do to fix this?
May be by explaining more clearly.
Information provided by you is not sufficient for answering. Please provide more information like when this error message is coming. From where you are loading data. Also show us the relevant code where error is coming.
|
|
|
|
|
It's a member profile update page having his details in text boxes.Data are loaded from data base.WHenever the page is loaded a load_data function is called.This page has no complecated codes.But during loading the page it's showing the message security exception.....
If required field validators are removed then the problem is solved.
|
|
|
|
|
Do you have any trust levels set? Read about it here[^] and try to set the trust level.
|
|
|
|
|
NO i haven't.Actually this problem is happening in godaddy server only.Locally it's working fine.
|
|
|
|
|
Locally your application will be running on full trust level and everything will work fine. But on servers, there will be usually medium trust level and you will run into problems. Read this[^] MSDN article.
|
|
|
|
|
Dear,I actually want to get all email address from user's email contact list who get registered in my site. Truly speaking, it's just a way to friend request by sending email to those emails. I want to do it in c#.
modified on Monday, March 30, 2009 7:44 AM
|
|
|
|
|
Arif Sabuz wrote: via contact grabber in ASP.NET
Contact grabber? What it is?
|
|
|
|
|
check this
http://www.ideabubbling.com/TestDrive.aspx[^]
“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
|
|
|
|
|
Hi!
I'm trying to set the clientcredentials of a wcf-proxy to CredentialCache.DefaultCredentials, but it seems to be empty for some mysterious reason.
I have the following code in my web.config:
<authentication mode="Windows" />
<!-- Windows is used, Kerberos is configured as authprovider in sharepoint -->
<identity impersonate="true" />
<!-- Sharepoint is setting impersonate=true as default... -->
<authorization>
<deny users="?" />
<!-- Force authentication by denying anonymous users. Default: allow users="*" -->
</authorization>
Any ideas why DefaultCredentials is empty?
betonglasermur.FeedDwarf(pur_is, 17);
ProcessStartupInfo.AintNotCreateNoWindow = (false && !true) != (true || false) ? false == true ? true : false : (true != false && false);
Morgonen är tröttmans mecka
|
|
|
|
|
Hi,
Whatr credential u r talking abt?
Are u trying to pass Network credential? or some thing else
Regards
Anil Pal
|
|
|
|
|
Yes, network credential.
Like this:
service.ClientCredentials.Windows.ClientCredential = (NetworkCredential)System.Net.CredentialCache.DefaultCredentials;
but DefaultCredentials are null even though i have the following settings in web.config:
<authentication mode="Windows" />
<!-- Windows is used, Kerberos is configured as authprovider in sharepoint -->
<identity impersonate="true" />
<!-- Sharepoint is setting impersonate=true as default... -->
<authorization>
<deny users="?" />
<!-- Force authentication by denying anonymous users. Default: allow users="*" -->
</authorization>
betonglasermur.FeedDwarf(pur_is, 17);
ProcessStartupInfo.AintNotCreateNoWindow = (false && !true) != (true || false) ? false == true ? true : false : (true != false && false);
Morgonen är tröttmans mecka
|
|
|
|
|
Hi,
Ar u working behind the proxy server ?
1.If, No and to assgin empty credential
WebProxy _proxy = new WebProxy();
2. If yes then:
WebProxy _proxy = new WebProxy("http://192.168.10.5:8080",true);
NetowrkCredential nc = new NetworkCredential(username, password, domain);//if any
Then u can assign _proxy and nc object to respective property of your calling code.
Regards
Anil Pal
|
|
|
|
|
Hi,
I am having a gridview at runtime in which I add row or column on click action of add row and add column buttons.
however in the Postback event I am not able to retrieve the text box in the templated column.
Kindly provide any idea, what I need to do
Thanks and regards
|
|
|
|
|
Hi,
Could u please send your code n requirement?
Regards
Anil Pal
|
|
|
|
|
It's a viewstate issue. Which event are you using to create the GridView ? Read about the page lifecycle and viewstate management. ASP.NET will not maintain viewstate for controls created after viewstate events in the page life cycle.
|
|
|
|
|
I am using a linkbutton in a grid view in one of the forms in VB.Net. When i tried to click the linkbtn keeping the shift btn pressed i got the error: Microsoft JScript runtime error:: Object expected and when it went to __doPostBack('ctl00$ContentPlaceHolder1$gridview1$ctl04$lbtnSelect','')
any solution for this?
Thanks in advance.
|
|
|
|
|
Hi,
May i know why u want to keep shift button while click on link button?
Regards
Anil Pal
|
|
|
|
|
I was trying to open the page which i have referred through the link button in a new window. if i use the option by right clicking the link button and choose the option open in new window the same error occurs.
any solution?
Thanks in advance.
|
|
|
|
|
Hi,
Please use HyperLink control in place if linkbutton. then use its Targte property
And then set Targat= _blank, in order to open a page in new window.
Feel free to ask.
Regards
Anil Pal
|
|
|
|
|
Hi,
Any one please help on the below issue.
We change the some text in the Footer control and Deployed the user control in Production
It is working fine in Dev box when we move to production we got the below error
Code
]]>
Copyright ©
2009 Standard Chartered Bank. All rights Reserved.
|
Runtime Error
An Application error occur on the server the current custom error settings for the application prevents the details of the application error from being\(reasons) I t could however be viewed by the browsers running on the Local server machine
Details
To enable the details of the specific error message to be viewable on remote machines. Please create a <customerror> tag within a "web.config" configuration of the current web application. This <customeerrors> tag should then have its mode arrribute set to "Off"
Do i need to build the Project and place the Dll in the production server, I changed the user control design only i didn't change any code level change.
Please help on this.
Thanks in Advance.
Regards,
Ranga
|
|
|
|
|
9 out of 10 intelligent people change the web config and get the real error message in this situation, so they can find out what is actually wrong.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Hi,
Could please explain your steps which u have perform to deploy user control on production server.
Like. How u r building your application.
2. Is there any specific assembly name.
Did u copied all the files which r required. etc.
So thats i can understand better
Regards
Anil Pal
|
|
|
|