|
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
|
|
|
|
|
See here: ASP.Net MVC[^]
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
|
|
|
|
|
hi iam using asp.net2.0 with c# with sql server 2000
when iam executing the procedure in local system it is working fine.but when iam executing in client system procedure returns null value, i have checked all connection string , and session value all are working
can you correct the code which helps me
SqlConnection concreate = new SqlConnection(strcon);
string pp = "";
pp = "create procedure getsum( @BranchKey int,@FromDate smalldatetime,@ToDate smalldatetime, @tot decimal output )";
pp += "as";
pp += "\n";
pp += "set @tot=(SELECT SUM(Amount) FROM AllTransactions WHERE BranchKey=@BranchKey and (TransCode <> 0) and (TransDate > @FromDate) and (TransDate < @ToDate) GROUP by BranchKey)";
pp += "return @tot";
pp += ";";
SqlCommand cmdcreate = new SqlCommand(pp, concreate);
concreate.Open();
cmdcreate.ExecuteNonQuery();
concreate.Close();
SqlConnection conproc = new SqlConnection(strcon);
conproc.Open();
SqlCommand cmdproc = new SqlCommand("getsum", conproc);
cmdproc.CommandType = CommandType.StoredProcedure;
cmdproc.Parameters.AddWithValue("@BranchKey", Convert.ToInt32(Session["BranchKey"]));
DateTime dt = Convert.ToDateTime(txtfrom.Text.ToString());
string fromDate = dt.ToShortDateString();
DateTime dt1 = Convert.ToDateTime(txtto.Text.ToString());
string toDate = dt1.ToShortDateString();
cmdproc.Parameters.AddWithValue("@FromDate", fromDate);
cmdproc.Parameters.AddWithValue("@ToDate", toDate);
SqlParameter p1 = cmdproc.Parameters.Add("@tot", SqlDbType.Decimal);
p1.Direction = ParameterDirection.Output;
if ((cmdproc.ExecuteScalar() != DBNull.Value) && (cmdproc.Parameters["@tot"].Value) != DBNull.Value)
{
decimal ot = Convert.ToDecimal(cmdproc.Parameters["@tot"].Value);
if (ot != null)
{
txttotal.Text = ot.ToString();
conproc.Close();
}
}
else
{
clsdataset.ShowAlertMessage("No Data");
}
|
|
|
|
|
|
Not an answer, but a question - Why are you creating the SP in your code?
Shreekar
|
|
|
|
|
Is the data the same in the two systems? Are you sure the query returns anything?
From the documentation for ExecuteScalar:
The first column of the first row in the result set, or a null reference (Nothing in Visual Basic) if the result set is empty.
You could try getting rid of the output parameter and just using a SELECT instead of a SET and RETURN.
Also, look into @ strings rather than lots of concatenation.
|
|
|
|
|
Hi,
I want to use progress bar in my webpage.
I dont want third party control.
How can i use AJAX updateprogress.
Thanks
sjs4u
|
|
|
|
|
|
Hi Freanids,
I am using a Gridview in my project but when i implement sorting on columns its giving following error randomly,
Error is bellow:
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Kindly help me on this issue, how i resolve it.
Thanks in advnace
Arsad
|
|
|
|
|
Did you try to google [^]the error message?
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Hi Manas,
Thanks for your suggestion on this actually i tried it before but i didn't succeed at that time as the most of comments suggest to add commond timeout attribute in connection string, for now i again implement it at this time no error occured, as i say it was randomly occur so hoping for best.
Thanks for help
Abbas
|
|
|
|
|
The query timeout happens for the query. So next time it happens, check the query that is executed. Compare it with the query that does not time out.
Maybe that will help?
Shreekar
|
|
|
|