|
Thanks For Reply
Can You Suggest me any URL Which will be helpful to me.
|
|
|
|
|
Hi Guys,
I have a doubt on how security is implemented when calling a webservice using javascript.
My concern is that when the application is running in http any one can easily know which javascript function is called and which webservice function it is calling and the location of the service also.
In this case how do you know if it comming from the right source or not ?. What are the ways security can be implemented in thie scenirio?
Thank in advance for your advice.
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
Hi all
I am implementing print configuration functionality on button click:
I am using following code:
protected void lnkButton_Click(object sender, EventArgs e)
{
StringBuilder sb = new StringBuilder();
sb.AppendLine(" var popup = window.open( '','popup','toolbar=no,menubar=no,scrollbars=1,width=750,height=800');");
sb.AppendLine("popup.document.write('debugger');");
sb.AppendLine("popup.document.write('<html><head>');");
sb.AppendLine("popup.document.write('<title>Configurations for ACA</title>');");
sb.AppendLine("popup.document.write('</head><body>');");
sb.AppendLine("popup.document.write('<div id='lnk' class='noprint' style='text-align:right'>');");
sb.AppendLine("popup.document.write('<a href='# onclick='window.print();return false;'>Print</a>');");
sb.AppendLine("popup.document.write('<a href='#' onclick='window.close();return false;'>Close</a>');");
sb.AppendLine("popup.document.write('</div>');");
sb.AppendLine("popup.document.write('<table border=1px style=width:500px; margin-left:100px; margin-top:50px; border-color:Maroon; >');");
sb.AppendLine("popup.document.write('<tr><td>');");
sb.AppendLine("popup.document.write('This is my string');");
sb.AppendLine("popup.document.write('</td><td>')");
sb.AppendLine("popup.document.write('" + MyString + @"');");
sb.AppendLine("popup.document.write('</td></tr></table>');");
sb.AppendLine("popup.document.write('</body></html>');");
Page.ClientScript.RegisterStartupScript(this.GetType(), "OpenWindow", sb.ToString(), true);
}
when I am executing this code, I am getting an exception on line
sb.AppendLine("popup.document.write('<div id='lnk' class='noprint' style='text-align:right'>');");
Can anyone please give me suggestion what is wrong?
Many thanks.
|
|
|
|
|
you used single quotes for both the text, and the inner text. This won't work, you need to use double quotes for the attributes, or the string literal.
sb.AppendLine("popup.document.write('<div id="lnk" class="noprint" style="text-align:right">');");
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thank you very much, this was helpful.
I have another problem now:
When I click on "Print" on pop up window, it does not open Print dialog box. When I wrote the client side javascript, it does open Print dialog box with printer listed.
Can anyone please what improvement should be done in the code? my code now look like
protected void lnkButton_Click(object sender, EventArgs e)
{
StringBuilder sb = new StringBuilder();
sb.AppendLine(" var popup = window.open( '','popup','toolbar=no,menubar=no,scrollbars=1,width=750,height=800');");
sb.AppendLine("popup.document.write('<html><head>');");
sb.AppendLine("popup.document.write('<title>Configurations for ACA</title>');");
sb.AppendLine("popup.document.write('</head><body>');");
sb.AppendLine("popup.document.write('<div id=\"lnk\" class=\"noprint\" style=\"text-align:right\">');");
sb.AppendLine("popup.document.write('<a href=\"#\" onclick=\"window.print();return false;\">Print</a>');");
sb.AppendLine("popup.document.write('<a href=\"#\" onclick=\"window.close();return false;\">Close</a>');");
sb.AppendLine("popup.document.write('</div>');");
sb.AppendLine("popup.document.write('<table border=1px style=width:500px; margin-left:100px; margin-top:50px; border-color:Maroon; >');");
sb.AppendLine("popup.document.write('<tr><td>');");
sb.AppendLine("popup.document.write('This is my string');");
sb.AppendLine("popup.document.write('</td><td>')");
sb.AppendLine("popup.document.write('This is my string');");
sb.AppendLine("popup.document.write('</td></tr></table>');");
sb.AppendLine("popup.document.write('</body></html>');");
Page.ClientScript.RegisterStartupScript(this.GetType(), "OpenWindow", sb.ToString(), true);
}
Many thanks...
|
|
|
|
|
Dear All,
I have a web application, for which a virtual directory has been configured for e.g "Users" and this can be accessed by the users by typing the URL www.MyAppl.com.
If the user types in www.MyAppl.com/Admin, then the web application has to redirect to a page which is outside the Virtual directory with the name of the folder "Admin".
Can any one help be how to perform this?
Thanks a lot in advance.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
Well if you think you can redirect someone from your site to say www.google.co.uk with no problem then you should be able to re-direct them to your admin section.
where is your admin section stored?
We are not a Code Charity
|
|
|
|
|
Dear Friend,
My Admin section has been stored outside the virtual directory and for which no more virtual directory is configured.
For e.g.
If the virtual directory of the site is pointing to a location "D:\MyWebAppl\Users\", then the admin is in the location "D:\MyWebAppl\Admin".
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
Then no, someone accessing your website will not be able to view a file that is not stored in the virtual directory.
We are not a Code Charity
|
|
|
|
|
Dear Friend,
Thank you for your information.
I will search some other alternate.
In the meanwhile can you let me know any other possibility to do the same.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
Why cant you put the file in the virtual directory?
We are not a Code Charity
|
|
|
|
|
Hi guys,
I'm wondering of these are possible:
1) I have a asp.net page that has a DetailsView in it. When the page loads it would load the 1st record in the database (which is fine). I have also "activated" the new (insert) button.
Is there a way for asp.net to auto activate the new? I mean, when the page loads, can it be in the "insert" mode immediately instead of the details display mode?
2) Also, is it possible to allow the user to select a record from a GridView and then have the page redirect to another page where it is in edit mode? i.e. upon clicking select in GridView, another page is open where it is in edit mode for that record selected?
If not, is there another way of doing this? Like creating a edit page where the user has to enter the record s/n they want to edit and have the DetailsView brought up in edit mode?
Thanks.
Desmond
|
|
|
|
|
Check this url[^]. This would help you.
|
|
|
|
|
1. Set the default mode of the detailview to 'Insert'.
2. Yes its possible by manipulating any appropriate event like OnItemCommand.
|
|
|
|
|
Wasif Ehsan wrote: 1. Set the default mode of the detailview to 'Insert'.
2. Yes its possible by manipulating any appropriate event like OnItemCommand.
Thanks a million.
1 works now. but I have no idea how to go about doing 2. Do you have an example or something that I can read?
Thanks.
Desmond
|
|
|
|
|
How do I remove the breaks between items in my autocomplete extender see picture in link ?
http://img212.imageshack.us/img212/9526/cplu1.jpg
modified on Thursday, June 12, 2008 9:07 PM
|
|
|
|
|
Hi
I am binding html headers with data from database using string builder
appending all them into single literal .i have to display next and previous records . iam using link button for Next and Previous.i dont have to use any Script languages.
Please anyone help me out in this.
thanks all.
krishna
|
|
|
|
|
read it from the db using a value on the query string and put the right values in links on the prev/next buttons
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I'm trying to make a site not using NT login, but my LoginName control is displaying my windows user name and I can't find a way to change it over.
My googlefu is weak today. I'm finding all sorts of articles about how the login controls in general work, but nothing about how to do this.
You know, every time I tried to win a bar-bet about being able to count to 1000 using my fingers I always got punched out when I reached 4....
-- El Corazon
|
|
|
|
|
Found the answer.
I needed to change the authentication mode parameter to forms in my web.config file.
You know, every time I tried to win a bar-bet about being able to count to 1000 using my fingers I always got punched out when I reached 4....
-- El Corazon
|
|
|
|
|
Hi All,
I developed a webservice which stands between other two web services. Its working fine. But if it get any exception beacuse of any reason or invalid data I should be able to pass some String message of exception information to them so that Exception can be informed to them.
Please give me advice how to handle this situation. Any blog or code snippet is very much helpful.
Thanks,
Aleem Mohammad.
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
One way is to add a try/catch in every web method and change your method signature to include an error code & error message.
Todd Smith
|
|
|
|
|
Hi Tod,
Could you give me any link which can give me details of it.
Thanks,
Aleem Mohammad.
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Hi,
I have a website that is data-driven, written in Asp.net and C#. I am having a problem with the following:
I need to be able to upload a .csv OR .xls file, add it to a database (the filename, along with a foreign key indicating which object the file belongs to). I know how to upload this, and store it in the database.
What I DO NOT know how to do, is display the spreadsheet on the website. I found something on Google that shows how to use the spreadsheet as a datasource, and use a datagrid to display it, but I can't figure out how to dynamically specify the spreadsheet to display.
For example, my site is about dogs. The spreadsheet will actually be a specific dog's pedigree. Therefore, when you're on the "Dogs" page, and are looking at a dog (which are displayed one page at a time in a datalist) the user clicks on the "View Pedigree" button, and I want the spreadsheet to become visible for that particular dog. Please click here to see what I am talking about.
I would like to do this in the easiest way possible, and would really appreciate any help you can provide. Thanks so much in advance!!!
|
|
|
|
|
I have a hidden asp label on my form and when the label has a property value Visible set to false I can not access the object in javascript using the getElementByID method. When Visible is set to true I can access it fine. What gives and how do I use javascript to store values into hidden fields?
Thanks,
Steve
|
|
|
|