|
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
|
|
|
|
|
Hi,
in my application - when I traverse for sometime to various tabs - suddenly login,aspx page is displayed.
When I checked logs - but no debugger statement printed there..and no javascript alerts are seen.
So I verified web.config for timeout properties but couldnot find anything to be changed
<authentication mode="Forms">
<forms loginUrl="login.aspx" protection="All" timeout="600" slidingExpiration="true" >
</forms>
</authentication>
and
<sessionState mode="InProc" timeout="600" />
Thanks and regards,
- Ajay Kale
|
|
|
|
|
You have already asked about asp.net login issues and received answers. Now you have spammed ever article you have found on the subject, 19 as I count, plus here.
How about following the last piece of advise given. READ THE DOCUMENTATION.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
But still after making changes - the issue is being reproduced for a particular page to logout while surfing the application.
- Ajay K
|
|
|
|
|
|
which one - at least do you know mere any name
|
|
|
|
|
hi i am using following code to auto complete educational institutes .. but my requirement is to fill educational institutes as per country id ..
i am unable to send country id as parameter to web method .. can any one help .... plz ??
<asp:TextBox ID="txtKey" runat="server" CssClass="regtxtbox" MaxLength="50"></asp:TextBox>
<asp:Panel runat="server" ID="myPanel1" Height="100px" ScrollBars="Vertical" style="overflow:hidden;width:50px;display:none;"> </asp:Panel>
<cc1:AutoCompleteExtender ID="AutoCompleteExtenderDemo" runat="server"
TargetControlID="txtKey" ServiceMethod="GetCompletionList"
MinimumPrefixLength="1" CompletionInterval="1000"
EnableCaching="true" CompletionSetCount="20" CompletionListElementID="myPanel1">
</cc1:AutoCompleteExtender>
public static string[] GetCompletionList(String prefixText, int count)
{
List<String> suggestions = new List<string>();
DataTable dtSchools = new DataTable();
Education education = new Education();
//List<String> suggetions = education.GetAllSchoolsSearch("",prefixText);
DataSet dsSchools = education.GetAllSchoolsSearch("", prefixText);
if (dsSchools != null)
{
dtSchools = dsSchools.Tables[0];
}
if (dtSchools != null && dtSchools.Rows != null && dtSchools.Rows.Count > 0)
{
foreach (DataRow dr in dtSchools.Rows)
{
string suggestion = dr["sschoolName"].ToString();
suggestions.Add(suggestion);
}
}
return suggestions.ToArray();
}
|
|
|
|
|
Dear Experts,
What are all the possible ways a session fixation can be solved. I have one solution(Anti-CSRF token implementation). Is there any other solutions.
Thanks in advance.
|
|
|
|
|
Hi guys,
Very good morning to all...,
i have a page in tht one image click i opened a pop up window...,
while openeing the popup window i have checked the session of "userid"...,
if session is expired i have to close the popup window and the parent page has to redirect to login page...,
so the popup window page i have declared in page load like this...,
_UserID = Session["UserID"] == null ? string.Empty : Session["UserID"].ToString().Trim();
if (_UserID == string.Empty)
{
System.Text.StringBuilder sb = new System.Text.StringBuilder();
sb.Append("<script language='javascript'>");
sb.Append("window.opener.location.href='/LoginPT.aspx?msg=se");
sb.Append("';");
sb.Append("self.close();");
sb.Append("</script>");
Page.RegisterStartupScript("FocusScript", sb.ToString());
}
but this is not working for me...,
plz guide me to solve this...,
Thanks & Regards,
Member 3879881,
please don't forget to vote on the post
|
|
|
|
|
Do you have script manager on the page ?
|
|
|
|
|
ScriptManager is irrelevant. It is for AJAX support and is not necessary for injecting normal JavaScript into a page.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Mark Nischalke wrote: ScriptManager is irrelevant.
I was asking becasue, If he has ScriptManager on the page, then the code he has written won't work.
Mark Nischalke wrote: It is for AJAX support and is not necessary for injecting normal JavaScript into a page.
|
|
|
|
|
Have you debugged it? Is the if condition being meet? Is the script being written and just not executed?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Dear All,
When i try to add master page to updatable page then when update a record it will update blank data to sql server.
Anyone has any idea?
Thanks in advance
|
|
|
|