|
Hi Experts
I have to know the status(stop/start) of windows service which is on remote server.
Thanks in advance
R Y K
|
|
|
|
|
|
I have a webdayview control (proprietary Infragistics ASP.net control) on my page. On the aspx source I’ve inserted some javascript (webdayview_click) that calls a webmethod in the codebehind. This seems to work fine, but when I insert this webdayview control into a user control and move the corresponding javascript into the aspx of the user control, it doesn’t work. I can’t even insert a breakpoint into the javascript function to debug it. Is there a way to make it work? I want to enable the click event of the webdayview control so that when I click on it, the javascript function calls the webmethod. Here’s my code (remember it's in a user control):
Aspx:
<igsch:webscheduleinfo id="WebScheduleInfo1" runat="server">
<ig_scheduledata:webschedulesqlclientprovider id="WebScheduleSqlClientProvider1"
="" runat="server" webscheduleinfoid="WebScheduleInfo1" stylesetname="" stylesetpath="" stylesheetdirectory="">
<igsch:webdayview id="WebDayView1" runat="server"
="" webscheduleinfoid="WebScheduleInfo1" stylesetname="" stylesetpath="" stylesheetdirectory="" stylesheetfilename="C:/Users/Hardus/Documents/Visual Studio 2008/WebSites/toets/ig_res/ElectricBlue/ig_dayview.css">
<clientevents click="WebDayView1_Click">
<igmisc:webpagestyler id="WebPageStyler1" runat="server"
="" stylesetname="Default">
Cs:
public partial class WebUserControl : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
this.WebScheduleSqlClientProvider1.Connect("Database=cmRMI;Server=processor;user id=hardus;password=hardus");
}
[System.Web.Services.WebMethod]
public static void SetAppointmentInfo(int key)
{
//Add code here
}
}
|
|
|
|
|
Please use PRE tags to format your code part. It really helps everyone to read and answer questions.
Hardus Lombaard wrote: insert this webdayview control into a user control and move the corresponding javascript into the aspx of the user control, it doesn’t work.
This means you have not taken care of the control names in Javascript. Once you put the control in a user control, a string would append at the start of your control name. This new ID which can be found out easily using a ViewSource of your webpage, must be used in Javascript to access it.
Hardus Lombaard wrote: . I can’t even insert a breakpoint into the javascript function to debug it.
Why so? You can put "debugger;" at the start of function and enable Javascript debugging in your IE settings! You are all set to debug it now.
|
|
|
|
|
Hello,
I am using an ASP TextBox control on my Web form, as shown below. Surprisingly, it suddenly started ignoring the text typed in the box, showing only zero-length string "" in the C# debug mode.
++++++++++++++++++++
<asp:TextBox ID="txtFileVersion" runat="server" Width="150px" class="focus" ></asp:TextBox>
++++++++++++++++++++++
To diagnose the problem, I defined a second textbox control, by dragging and dropping the control from the ASP Toolbox. This second one works fine. Any clues please?
Regards,
Shailender
|
|
|
|
|
Shailender K wrote: This second one works fine. Any clues please?
If so, then there is something in your code related to first textbox that creates an issue. You need to look at the code base, debug it and find.
For now, if you can replace it with new one, go ahead and save your time.
|
|
|
|
|
Hello Sandeep and T.M.,
You were both right. Stupid me! I did not verify the event-firing after my code was integrated with others'. Page_Load and IsPostBack were not correctly figuredout when my original code was integrated with the team's. And I was lazy to figure this out myself.
Thank you both. Laters.
Regards,
Shailender
|
|
|
|
|
|
You aren't very clear in what is happening. When you type in the box in your browser, does the text appear? Is there anything in your code-behind that sets the value? In what event are you checking for a value? If it is the TextChanged event are you sure youaren't doing something in page_load or init that wipes out the value?
BTW, I would try to avoid using CSS class names that are also javascript keywords and/or CSS psuedo-classes.
|
|
|
|
|
Hi..
I am working on a web application and storing logged in user to application object.
once they signout its entry will be deleted from application object - application["Loggedinusers"]
( I have stored arraylist as list of logged in users)
So , once the session ends by signout or timeout user gets deleted.
But it doesn't work when user closes the browser without logging out.
Means the entry is not deleted from Logged in users.
So next time if he logs in, " It says you are already logged in"....
Can you provide me the way to resolve this.
Thanks,
By:
Hemant Thaker
|
|
|
|
|
See, when user log out by signout or timeout then session_end get called so user gets deleted, but when user close the browser then session_end is called only when the time out expires. So when user tries just after closing the browser and try to open the application then it shows as logged in but if try to access after the session timeout then would not show because session_end will be called after timeout.
So if you want to logout just after the browser close then you have to detect the browser close and logout the user by code. So for this do the following
- Make an temporary page
- On pageload of this remove the user from applicaton object
- Now on every page of your application detect the browser close and load this page as popup with 0 size and after loading close this popup.
The code for detecting the browser close is like
function CheckBrowser()
{
if(window.event.clientX < 0 && window.event.clientY <0)
{
window.open("Temp.aspx",
"Operation",'left=12000,top=1200,width=10,height=1');
}
}
here Temp.aspx is your temporary page.
For details about Application Objects you han have a look to one of my article
A walkthrough to Application State
|
|
|
|
|
Hi..
thanks, its biggest resolution so far.
well.. how about calling CheckBrowser() function in master page
As I am using master page.
Can I use
thanks,
By:
Hemant Thaker
|
|
|
|
|
I wouldn't use a window.open as that can be annoying and/or scary to users. I would probably use a XMLHttpRequest from the javascript since that is much less visible. Also another trick for pages that do not need to show the user anything and are just to update server-side info is set the http status code to 204.
Another option is to set a cookie when they close the browser. Whenever someone comes to your site check for the "ImReallyLoggedOut" cookie before showing the message.
|
|
|
|
|
Hello Every One,
i need an algorithm which i can use to retrieve controls from data base ordered ....
i have a function that loop through the page and get the id's of the controls on this page after that it goes to the database to insert this data .
The algorithm will help in retrieving these data ordered .
Example:
i have the following:
lbl_lable2-----txt_textbox1-----val_validator3
lbl_lable1-----txt_textbox3-----val_validator2
lbl_lable3-----txt_textbox2-----val_validator1
i loop through them and get all of them in the db ,Now i want to retrive from the db in this way:
lbl_lable1-----txt_textbox1-----val_validator1
lbl_lable2-----txt_textbox2-----val_validator2
lbl_lable3-----txt_textbox3-----val_validator3
Thanks in advance
eslam adam
|
|
|
|
|
Er, could you not bind the controls to, perhaps, the result of a DataTable or similar?
me, me, me
"The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!"
Larry Niven
nils illegitimus carborundum
|
|
|
|
|
Hello all,
I'm working on some Desktop based Project in VB.Net in which I have made a page (say UpdateData.aspx) to update the employeeDetails.In that page, There is a DataGridView that displays all the detials. So, I'm using the cell_click event of the gridview. So, When I click on the gridview row, it retrieves all the records which are then populated into respective fields, except into 3 combobox fields.
I don't know what to do with them to enter some particular value into those comboboxes as those also contain some datasource.
And My code is like the following:
ds = obj.GetDetails(objBo)
If ds.Tables(0).Rows.Count>0 Then
comboItemName.SelectedText = ds.Tables(0).Rows(0)("itemName")
comboItemSerialNo.SelectedText = ds.Tables(0).Rows(0)("SerialNo")
END
please help...
Thanks in advance
|
|
|
|
|
vinci007 wrote:
some Desktop based Project
I assume this was a typo.
Provided that you have setup the data source for the comboboxes in the template (if using them), and the selected text matches the valid entries, the display should be correct. You may also need to provide the selectedvalue properties though.
What is the error/problem?
Shreekar
|
|
|
|
|
Yeah, there are valid datasource in the combobox. The problem is that the value is not shown in the "comboItem" combobox for editing... in other words , combobox doesn't get value on edit...
what could be the error...
|
|
|
|
|
Please share the relevant code as the sequence of events might have some bearing on the problem.
Can you see the list of values in the dropdown?
Shreekar
|
|
|
|
|
Hi All i m creating the grid using the following way
<pre>
private void loadDynamicGrid(Int32 startTime, Int32 endTime, String firstTime)
{
//Create an instance of DataTable
//Create an ID column for adding to the Datatable
dt = new DataTable();
DataColumn dcol = new DataColumn(ID, typeof(System.Int32));
dcol.AutoIncrement = true;
dt.Columns.Add(dcol);
DataRow drow = null;
drow = dt.NewRow();
//Add the row to the datatable.
dt.Rows.Add(drow);
BoundField bfield = new BoundField();
if (String.Compare(firstTime, "firstTime") != 0)
{
GrdDynamic.Columns.Clear();
bfield.HeaderText = " " + "MODALITY" + " ";
bfield.HeaderStyle.BackColor = Color.LightGray;
bfield.HtmlEncode = false;
GrdDynamic.Columns.Add(bfield);
}
foreach (DataColumn col in dt.Columns)
{
for (Int32 index = startTime; index < endTime; index++)
{
Int32 hour = index;
for (Int32 minute = 0; minute <= 3; minute++)
{
//BoundField bfield = new BoundField();
bfield = new BoundField();
String headertext1 = ((hour.ToString()) + ":" + (15 * minute));
String[] headerText = headertext1.Split(':');
if (headerText[0].Length == 1)
{
bfield.HeaderText = " 0" + headerText[0] + ":" + headerText[1];
}
else
{
bfield.HeaderText = " " + headerText[0] + ":" + headerText[1];
}
if (headerText[1].Length == 1)
{
bfield.HeaderText = bfield.HeaderText + "0 ";
}
else
{
bfield.HeaderText = bfield.HeaderText + " ";
}
bfield.HtmlEncode = false;
GrdDynamic.Columns.Add(bfield);
//GrdDynamic.CellSpacing = 1;
}
}
}
//Initialize the DataSource
GrdDynamic.DataSource = dt;
//Bind the datatable with the GridView.
GrdDynamic.DataBind();
}
</pre>
i want to add link button in grid cell based on some condition.
how to do this
<pre>
calling function using following call.
</pre>
|
|
|
|
|
I have an xml configuration file in my project.
when I am working in debug mode of .net IDE it is working fine, but when i tried to launch the project from IE, it is taking different path
ex:
below code works well in debug mode, but unable to launch in IE directly (http://localhost/WebProj/login.aspx)
Pathtype A:
HttpContext.Current.Server.MapPath(@"\Configuration\xyz.xml");
below code works well in IE and debug mode but having different problem.
Pathtype B:
HttpContext.Current.Server.MapPath("") + @"\Configuration\xyz.xml";
Problem: I have a folder MainPages under root folder of the project. under this I have AdminPages. These admin pages are not retrieving if I used pathtype B specified above and gives error no page available, but works fine when pathtype A specified above is used which runs in debug mode only but not able launch from IE.
Help me please.
|
|
|
|
|
Hi KishoreT,
if i understand you right, you have the xml-file in a subdirectory of the root of the webpage. The subdirctory is "Configuration". Therefore i suggest you use the following to get the path:
HttpContext.Current.Server.MapPath(@"~\Configuration\xyz.xml");
The difference is the ~ (tilde) character. It represents the homedirectory or root of the webapp.
Hope this helps
Regards
Jens
When in trouble,
when in doubt,
run in circles,
scream and shout
|
|
|
|
|
Hey thank u its working by placing ~.
|
|
|
|
|
Hi,
am using actionchart in one of my asp.net 2.0 application. also now am using "AjaxPro.AjaxHandlerFactory,AjaxPro.2" in this application for that i have added one handler in web.config file.
<httpHandlers>
<!--<add verb="*" path="*.ashx" type="AjaxPro.AjaxHandlerFactory,AjaxPro.2"/>-->
</httpHandlers>
</system.web>
like that.
After that, my action chart is not working!!!
But if am commenting the handler part, action chart will work, but ajaxPro willnot work.
Please help me ASAP.
I have to resolve by the end of today
Thanks & Regards,
Jeneesh K. Velayudhan
|
|
|
|
|
Hi All,
I am Developing a web base project using asp.net mvc 2.0 architecture for my current window based application.
The following things will be used in my project.
1.The Menu and sub Menus
2.Support for multiple database
3.The view for displaying record fetch from the database
4.Making connection to service
so if anybody can give the url for similar projects which i can refer to it will be quite helpful
Thanks in advnace
Ramesh singh
|
|
|
|