|
I am still learning.
suchita
|
|
|
|
|
SayamiSuchi wrote: I am still learning.
Very Nice !!!
|
|
|
|
|
Of course you can do it from code behind, you can do just about anything form code-behind you don't need a web.config for such things. Adjust the settings based on the URL the user is using. Store configuration in a database. You have a number of options that depend on many things; requirements, usage, storage medium, extensibility, there is no simple answer.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
plz i want help me
i want connect web pages with google earth
i make project web directory used asp.net and i want connect with google earth
if clicke linke any places i saved information in data base about it
show in the google earth
i want how to connect and i want What are the processes that must to do it?
what the file or code i need to it????
plz help me any thing
|
|
|
|
|
Did you even...try looking at the google earth API section?
is a starting point
Yes, it's js but you can pass that back to the server and then do all the database backend stuff you want.
|
|
|
|
|
No I will not enter into direct email conversation with you, I can provide aid and guidance but I cannot work on the code itself with you, you are better off providing clarity on what you have tried, where it has failed and what you are stuck on here so others can provide their input.
I am replying here because i do not to share my email address.
|
|
|
|
|
<%@ Page Language="C#" MasterPageFile="~/SLS.Master" EnableEventValidation="false" AutoEventWireup="true" CodeBehind="QuickStart.aspx.cs" Inherits="SLS.QuickStart" Title="SLS - Quickstart" %>
<%@ Register Src="Controls/UserReports.ascx" TagName="UserReports" TagPrefix="uc1" %>
<%@ Register Src="Controls/AdvancedSearch.ascx" TagName="AdvancedSearch" TagPrefix="uc1" %>
<%@ Register Src="Controls/Submit.ascx" TagName="Submit" TagPrefix="uc1" %>
<%@ Register Src="Controls/MySLS.ascx" TagName="MySLS" TagPrefix="uc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="AjaxToolkit" %>
<%@ Register Src="Controls/Search.ascx" TagName="Search" TagPrefix="uc1" %>
<%@ Import Namespace="SLS.DAL" %>
<%@ Import Namespace="System.Configuration" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="HelpLink" style="padding-left:750px;padding-top:4px;"><a target="_blank" href="Help/SLS_HELP.htm">Help Me!</a></div>
<script>
var searchPage="VivisimoSearch.aspx";
//When the active tab changes
function ActiveTabChanged(sender, e) {
var text="SLS - " +sender.get_activeTab().get_headerText();
window.parent.document.title=text;
document.getElementById('<%=AdvancedSearch1.ClientID%>_hidtxtFind').value = "0";
if(sender.get_activeTab().get_tabIndex()!=5){
var tabBehavior=document.getElementById('<%=TabContainer1.ClientID%>').control;
tabBehavior.removeCssClass("CustomTabStyle1");
tabBehavior.addCssClass("CustomTabStyle");
tabBehavior._tabs[5]._hide(true);
}
//SLS-116 :- Google analytics
GoogleTrackPage(sender.get_activeTab().get_headerText());
}
//Google Analytics to grab the page
function GoogleTrackPage(tab){
//when we are on the 5th tab in that case (tab = "")
//So we are not recording the url here
//in the 5th tab ViewReport.aspx gets loaded
//so we are placing the google anatylitcs user control there to track the url
if(tab != ""){
var appName = '<%= Util.GetConfigValue("ApplicationName") %>';
var gaTrackingId = '<%= Util.GetConfigValue("GATrackingCode") %>';
var pageTracker = _gat._getTracker(gaTrackingId);
pageTracker._trackPageview(appName + "/QuickStart.aspx/" + tab);
}
}
//Edit a search
function editSearch(searchId){
//Get the tabBehavior object
if(searchId!="-1"){
var tabBehavior=document.getElementById('<%=TabContainer1.ClientID%>').control;
//Go to the third tab (Submit)
tabBehavior.set_activeTabIndex(2);
//Set the value in the txtReportID textbox on the CreateSavedSearch.ascx interface.
var tb=document.getElementById('<%=Submit1.ClientID%>_txtReportId');
tb.value=searchId;
//Click the button to edit the search.
var btn=document.getElementById('<%=Submit1.ClientID%>_cmdReload');
Page_ValidationActive=false;
btn.click();
}
}
function fnViewAuthor(userId){
sURL="ViewAuthor.aspx?userId=" + userId;
var win=window.open(sURL,'EditsearchForm','scrollbars=yes,resizable=yes,width=430,height=380');
win.focus();
}
function fnViewReport(reportId){
var tabBehavior=document.getElementById('<%=TabContainer1.ClientID%>').control;
//Go to the sixth tab (ViewReport)
//document.getElementById('<%=TabPanel6.ClientID%>').disabled =false;
tabBehavior.removeCssClass("CustomTabStyle");
tabBehavior.addCssClass("CustomTabStyle1");
tabBehavior.set_activeTabIndex(5);
var frmframeReport = document.getElementById('<%=frameReport.ClientID%>');
frmframeReport.src ="Test.htm";
frmframeReport.src="ViewReport.aspx?reportID=" + reportId;
}
function fnLoadSearch(){
var frmframeReport = document.getElementById('<%=frameReport.ClientID%>');
frmframeReport.src="";
frmframeReport.src=searchPage;
}
function fnLoadSearchResult(_find,_search){
if(_search == undefined){
_search = '';
}
var tabBehavior=document.getElementById('<%=TabContainer1.ClientID%>').control;
tabBehavior.removeCssClass("CustomTabStyle");
tabBehavior.addCssClass("CustomTabStyle1");
tabBehavior.set_activeTabIndex(5);
var frmframeReport = document.getElementById('<%=frameReport.ClientID%>');
frmframeReport.src="";
frmframeReport.src=searchPage+"?find=" + _find + "&search_MR=" + _search;
}
//function SetDateRangeSearchControl(searchPeriodText){
//get the Search control in quick search control
//var ddlList=document.getElementById('<%=Search1.ClientID%>_ddlSearchPeriod');
//ddlList.options[ddlList.selectedIndex].text=searchPeriodText;
//get the Search control in MYSLS control
//var ddlsearchCtrl=document.getElementById('<%=MySLS.ClientID%>_Search1_ddlSearchPeriod');
//ddlsearchCtrl.options[ddlsearchCtrl.selectedIndex].text=searchPeriodText;
//}
function fnSubmit(){
var tabBehavior=document.getElementById('<%=TabContainer1.ClientID%>').control;
//Go to the third tab (Submit)
tabBehavior.set_activeTabIndex(2);
//Set the value in the txtReportId textbox on the Submit.ascx interface.
var tb=document.getElementById('<%=Submit1.ClientID%>_txtReportId');
tb.value=0;
//Click the button to get the report
var btn=document.getElementById('<%=Submit1.ClientID%>_cmdReload');
btn.click();
}
function fnSearchTip(){
sURL="SearchTip.aspx";
var win=window.open(sURL,'searchTip','scrollbars=yes,resizable=yes,width=620,height=600');
win.focus();
}
function fnAdvanceSearch(){
var tabBehavior=document.getElementById('<%=TabContainer1.ClientID%>').control;
//Go to the second tab (advanced search)
tabBehavior.set_activeTabIndex(1);
}
function fnMySLS(){
var tabBehavior=document.getElementById('<%=TabContainer1.ClientID%>').control;
//Go to the last tab (mysls)
tabBehavior.set_activeTabIndex(4);
}
function ReloadSavedSearches(){
//SLS-76
//This below two statements will again load the VivisimoSearch.aspx again
// If we do not do that first time when user save a search this function gets called from VivisimoSearch.aspx
// after calling this function we set window.clearInterval(interval) in VivisimoSearch.aspx which stop looping the checkForMessages function in VivisimoSearch.aspx
//so again have to reload the VivisimoSearch.aspx
var frmframeReport = document.getElementById('<%=frameReport.ClientID%>');
frmframeReport.src=searchPage;
//Click the button
var btn=document.getElementById('<%= cmdReloadSearch.ClientID%>');
btn.click();
}
function fnLoadSearches(searchID){
var tabBehavior=document.getElementById('<%=TabContainer1.ClientID%>').control;
//Go to the tab (Advanced search)
tabBehavior.set_activeTabIndex(1);
var txtSearchID=document.getElementById('<%=AdvancedSearch1.ClientID%>_hidtxtSearchID');
txtSearchID.value = searchID;
//Click the button to get the search
var btn=document.getElementById('<%=AdvancedSearch1.ClientID%>_cmdLoadSearch');
btn.click();
}
function fnGetReport(userID){
if(userID!=""){
//Set the value in the txtUserID textbox on the MYSLS.ascx interface.
var tb=document.getElementById('<%=MySLS.ClientID%>_txtUserId');
tb.value=userID;
//Click the button to get the report
var btn=document.getElementById('<%=MySLS.ClientID%>_cmdReload');
btn.click();
}
}
// Added frame to simulate download prossess of attachment
// without opening new Window
function downloadLink(link){
var downloadFrame = document.getElementById('downloadFrame');
downloadFrame.src = link;
var but = document.getElementById('<%=cmdReloadCount.ClientID %>');
but.click();
return;
}
function fnBookmarkReportIDs(bookmarkReportIDs){
//Click the button to get the report
var tb=document.getElementById('<%=MySLS.ClientID%>_txtbookmarReportIDs');
tb.value=bookmarkReportIDs;
var btn=document.getElementById('<%=MySLS.ClientID%>_cmdReload');
btn.click();
}
function fnReloadTreeView(){
var btn=document.getElementById('<%=MySLS.ClientID%>_cmdReloadTree');
btn.click();
}
// window to open who else is interested window
function fnWhoElseInterested(reportId,userId){
if (userId != '' && reportId!=0){
window.open("WhoElseInterested.aspx?reportId="+ reportId + "&userid="+ userId);
}else{
alert("This SLS feature will display who's interested in this report. It will be enabled for this report soon.");
}
}
function fnReloadAdvancedSearch(){
alert("fnReloadAdvancedSearch")
}
// SLS-150
// Function added to refresh the Read View count of reports
// in mysls tab
function RefreshMYSLS(rptCat){
if(rptCat == "View Report"){
var btn=document.getElementById('<%=MySLS.ClientID%>_linkMyReports');
btn.click();
}
}
</script>
<AjaxToolkit:TabContainer ID="TabContainer1" OnClientActiveTabChanged="ActiveTabChanged" runat="server" CssClass="CustomTabStyle" Width="980px">
<AjaxToolkit:TabPanel ID="TabPanel1" runat="server" HeaderText="Quick Start">
<ContentTemplate>
<table width="100%" border=0>
<tr>
<td align="left">
<uc1:Search ID="Search1" runat="server" />
</td>
</tr>
<tr>
<td class=headerBar>Leveraging the Smart Learning System!<br /></td>
<td> </td>
<td class=headerBar>What can I do with the Smart Learning System.</td>
</tr>
<tr>
<td valign=top width=50% align=center>
<asp:UpdatePanel ID="udpContentTypeREfreshQuickStartMsg" runat="server">
<ContentTemplate><br /><asp:Label ID="lblReadReports" runat="server" CssClass="boldText" >1,016 reports Submitted 10,924 reports Viewed in last 30 days</asp:Label><br /><br />
<uc1:UserReports ID="UserReports1" runat="server" />
</ContentTemplate>
</asp:UpdatePanel>
</td>
<td> </td>
<td valign=top width=50%>
<p class=blueText><b>Submit</b> a report</p>
Make your valuable knowledge available to others.<br />
<ul style="margin-top ">
<li><img src="Images/word.gif" /> <a target="_blank" href="Documents/slsReportTemplate.doc">Download a report template</a></li>
<li><a href="javascript:fnSubmit();">Submit a report</a> </li>
<li><a href="http://sls.pg.com/sls/reports/256980/ViewReport.ashx">SLS Content Guidelines</a></li>
</ul>
<p class=blueText><b>Search</b> for reports </p>
Find the reports you are interested in.
<asp:UpdatePanel ID="udpContentType1" runat="server">
<ContentTemplate>
<ul style="margin-top ">
<li><a href="javascript:fnSearchTip();">Search Tips</a> </li>
<li><a href="javascript:fnAdvanceSearch();">Advanced Search</a></li>
<li>Saved Searches <asp:DropDownList CssClass=savedSearches ID=ddlSavedSearches OnSelectedIndexChanged="ddlSavedSearches_SelectedIndexChanged" AutoPostBack="true" runat=server/></li>
</ul>
</ContentTemplate>
</asp:UpdatePanel>
<p class=blueText><b>Subscribe</b> to reports through iSubscribe</p>
Be notified by email of new reports you are interested in.
<ul style="margin-top ">
<li><a target="_blank" href="http://isubscribe.pg.com">Subscribe to reports through iSubscribe</a></li>
<li><a target="_blank" href="http://isubscribe.pg.com">View your recent subscription results</a></li>
<li><a target="_blank" href="http://isubscribe.pg.com">Manage your subscriptions</a></li>
</ul>
<p class=blueText><b>Training</b> on how to use SLS.</p>
Learn how to use SLS and its new capabilities
<ul style="margin-top ">
<li><a href="#" onClick="SLRREN = window.open('http://intraprod1.internal.pg.com/technet/tech_dev/sls-training/infomercial/SLSpopGenric.html','SLRrenewalSLS','resizable=yes,width=600,height=400'); SLRREN.focus(); return false;">View an Introduction to SLS (6 min)</a></li>
<li><a href="http://intraprod1.internal.pg.com/technet/tech_dev/sls-training/infomercial/SLS-training.ppt">View the Self-Guided Training (30 min)</a></li>
<li><a href="Documents/SLSQuicksheet.doc">SLS Quick Sheet (1 page)</a></li>
</ul>
</td>
</tr>
</table>
</ContentTemplate>
</AjaxToolkit:TabPanel>
<AjaxToolkit:TabPanel ID="TabPanel2" runat="server" HeaderText="Advanced Search">
<ContentTemplate>
<uc1:AdvancedSearch ID="AdvancedSearch1" runat="server" />
</ContentTemplate>
</AjaxToolkit:TabPanel>
<AjaxToolkit:TabPanel ID="TabPanel3" runat="server" HeaderText="Submit">
<ContentTemplate>
<asp:UpdatePanel ID=pnl runat=server >
<ContentTemplate>
<uc1:Submit ID="Submit1" runat="server" />
</ContentTemplate>
</asp:UpdatePanel>
</ContentTemplate>
</AjaxToolkit:TabPanel>
<AjaxToolkit:TabPanel ID="TabPanel4" runat="server" HeaderText="Personal Networks">
<ContentTemplate>
<%-- <iframe width=100% style="height:600px" frameborder=0 src="http://web03.na.pg.com/PersonalNetworks/ManageNetworks.aspx"></iframe>
--%> <iframe width=100% style="height:600px" frameborder=0 src="http://bdc-intra528.internal.pg.com/iToolsGroupService/Pages/ManageNetworks.aspx"></iframe>
</ContentTemplate>
</AjaxToolkit:TabPanel>
<AjaxToolkit:TabPanel ID="TabPanel5" runat="server" HeaderText="MySLS">
<ContentTemplate>
<table border="0" width="100%">
<tr>
<td align="left">
<uc1:Search ID="Search2" runat="server" />
</td>
</tr>
<tr>
<td align="left">
<uc1:MySLS ID="MySLS" runat="server" />
</td>
</tr>
</table>
</ContentTemplate>
</AjaxToolkit:TabPanel>
<AjaxToolkit:TabPanel ID="TabPanel6" runat="server" Enabled=false Width="1">
<ContentTemplate>
<iframe id="frameReport" style="margin " frameborder=no scrolling="auto" width="100%" height="900" src="" runat="server" ></iframe>
</ContentTemplate>
</AjaxToolkit:TabPanel>
</AjaxToolkit:TabContainer>
<asp:UpdatePanel ID=updateFrame runat=server >
<ContentTemplate>
<asp:Button ID="cmdReloadSearch" runat="server" CssClass="hidden" CausesValidation="false" OnClick="cmdReloadSearch_Click"/>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID=updateCountOnQuickStart runat=server >
<ContentTemplate>
<asp:Button ID="cmdReloadCount" runat="server" CssClass="hidden" CausesValidation="false" OnClick="cmdReloadCount_Click"/>
</ContentTemplate>
</asp:UpdatePanel>
<asp:Button ID=cmdRefine runat=server CssClass="hidden" CausesValidation="false" OnClick="cmdRefine_Click" />
<asp:Button ID="btnViewReport" runat="server" CssClass="hidden" CausesValidation="false" OnClick="btnViewReport_Click"/>
<iframe id="downloadFrame" style="display: none"></iframe>
</asp:Content>
|
|
|
|
|
So, what is your question???
Cheers,
Karthik
|
|
|
|
|
Dear Experts,
I want to secure my application so i need to Disable Status Bar so that when mouse kept on the link it wont display the informations in the Status Bar.
Thanks in advance
|
|
|
|
|
You can use javascript to do this, but how on earth do you think this will secure your application in any way?
|
|
|
|
|
You can't disable the status bar on the main window unless you have used window.open to create. You can use JavaScript to set the statusbar text for the link to be empty
<a href="..." onMouseOver="status.text=''">
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
... onmouseover="self.status=''; return true;" ...
FTFY
Downvote it all you like, the fact remains my "correction" is correct and (no offence meant, but) Mark's snippet was not.
modified on Monday, September 27, 2010 1:08 PM
|
|
|
|
|
Use javascripts it will hide it. I think hiding it is what you mean secure
|
|
|
|
|
Yeah, I know been a long time since I've done it, got the names wrong. But got the meaning.
As for the down vote, well there are ID10Ts everywhere, brush it off and don't feed them.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Your application will not be any more secure by hiding the status. Users can still right click on the links and copy the location. They can also view source. Any of the tricks you use to disable any of those options can be defeated by visiting your site with javascript turned off.
If you don't want users to visit a page directly then you need to implement something different that checks their access rights in the OnInit of each page.
|
|
|
|
|
Hi,
I have a gridview and a button-Start in aspx page.
In gridview 3 columns checkbox , Name and Status.
Select multiple columns and click on Start then Status column for selected rows should be changed to "Starting...", later it should be changed to "Started".
But it is showing directly "Started". In the mean time i should see "Starting..." also.
Here is my code
Aspx page
<asp:gridview id="GrdViewM" runat="server" autogeneratecolumns="False">
<columns>
<asp:templatefield> <itemtemplate> <asp:checkbox id="ChkBoxView" runat="server">
<itemtemplate> <asp:boundfield headertext="Name" datafield="Name">
<asp:templatefield headertext="Status"> <itemtemplate>
<asp:label id="Label1" runat="server" text="<%# Bind("Status") %>">
<asp:linkbutton id="LnkBtnStart" runat="server" onclick="LnkBtnStart_Click">
Start
.cs File
protected void Page_Load(object sender, EventArgs e)
{ if (!IsPostBack)
{
GridData();
}
}
public void GridData()
{
DataTable dt = new DataTable();
dt.Columns.Add("VMName");
dt.Columns.Add("Status");
dt.Rows.Add("abc", "Stopped);
dt.Rows.Add("xyx", "Running);
dt.Rows.Add("xyz", "Stopped);
GrdViewM.DataSource = dt;
GrdViewM.DataBind();
}
public ArrayList FindChk()
{
ArrayList arr = new ArrayList();
if (GrdViewM.Rows.Count > 0)
{
for (int i = 0; i < GrdViewM.Rows.Count; i++)
{
//finding checkbox in GridView
CheckBox cbx = (CheckBox)GrdViewM.Rows[i].FindControl("ChkBoxView");
//CheckBox not null
if (cbx != null)
{
//if CheckBox Checked
if (cbx.Checked)
{
arr.Add(new string[] { i.ToString(), GrdViewM.Rows[i].Cells[1].Text});
}
}
}
}
return arr;
}
protected void LnkBtnStart_Click(object sender, EventArgs e)
{
Stat();
System.Threading.Thread.Sleep(3000);
ArrayList arr = FindVM();
if (arr.Count > 0)
{
string Name = string.Empty;
foreach (string[] s in arr)
{
VMName = s[1].ToString();
int rid = Convert.ToInt32(s[0]);
GrdViewM.Rows[i].Cells[1].Text = "Running";
}}}
public void stat()
{
ArrayList arr = FindVM();
if (arr.Count > 0)
{
string VMName = string.Empty;
foreach (string[] s in arr)
{ VMName = s[1].ToString();
int rid = Convert.ToInt32(s[0]);
GrdViewM.Rows[i].Cells[1].Text = "Starting.....";
}
}}
Please Help Me
|
|
|
|
|
hi,
We Developed one reminder service Web Application for displaying reminder popups like OutLook Express.We installed windows service on the Server, here we need to show the reminders of each user respectively when he/she logins.Please suggest me better way to do this.
Thanks & Regards,
Vishnu.
|
|
|
|
|
A windows service on a server to display reminders to ASP.NET users is useless. Think about it. Are the users going to be sitting in your server room to see the messages?
When the user logs in to the web application then you can display any reminders by rendering and serving an ASP.NET page to their browser.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
hi,
we need to show reminder for each and every user individually based on the reminder time set by the user. Here My doubt is how to show the reminder popup in the client browser. Is it possible to run a windows service in server and send a page to the client when the reminder time matches the server time? or is there any other way to show reminders on the client system from server without installing any additional services on the client system?
|
|
|
|
|
vishnukamath wrote: Is it possible to run a windows service in server and send a page to the client
NO!
You don't seem to understand the concepts of ASP.NET or web development. Think. How would a server know what pc to send the page to? How it know if the PC were on? What if the IP address changed? How would you feel if someone suddenly sent a message and opened your browser when you were in the middle of a presentation?
As I said, they only way you can do this is check when the user logs into your site. You can use ajax to check and send alerts, but only while the user is active on your site.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
|
hi
Could you please explain me how to do this, and i need to get client system time through service .
Thanks & Regards,
Vishnu.
|
|
|
|
|
@Vishnu
Think of it this way, Outlook is NOT a web application, its a windows application. Your is a web application that "executes" in a browser and so would have no access to the client's machine (in general). In order to do this you need to have a windows service on your client's machine which could talk to your server and get the information required. So when there are remainders to be pushed to the client, the windows service on the "Client" side gets it from your server and the windows service can in turn do something to display that to the client. So essentially your server should have another windows service or a web service to serve the requests from the client's windows service.
If its a web application that you are talking about, as Mark said, unless the user logs in to your site, he/she cannot get the remainders.
Hope this helps.
Cheers,
Karthik
|
|
|
|
|
hi,
The functionality on which i am working is that unless the user logs in to our web application, he/she cannot get the reminders. As soon as the user logs in, he/she must get the reminders irrespective of the section he /she is browsing in our web application by showing popup window according to the time in the client system and update the status on the server. Please suggest me a solution.
Thanks in advance
Regards,
Vishnu
|
|
|
|
|
You could do something like this, but this may not be the best solution.
* Once the user logs in on Page_Load verify whether the user has any remainders and show it if it matches w/ the remainder date/time.
* If there are none, you could then find if there are any remainders in the near future say, in the next "few" minutes, you will have to decide this "few"
* If there are remainders set up in the next "few" minutes, use javascript (setTimeOut) to wait for that time and then when its the time to dispaly the remainder get it from the server using AJAX and display it.
* If the user navigates away from this page to another page, the same rule applies.
* If the user is in a page where-in he can set remainders, you need to have a javascript function that is being called w/ setTimeOut to verify if there are any remainders to be displayed
PS - Again this may not be the best solution as this one was an immediate solution that occurred to me.
Cheers,
Karthik
|
|
|
|