|
Hi,
Try to get the path this way:
string path=Server.MapPath("..\\MyProject");
then you can add the file name to this "path" and save it.
Regards,
Blumen
|
|
|
|
|
thnx a lot, it worked
|
|
|
|
|
Hello all,,,
Am having one problem while developing,, please help me out as soon as possible,,, its urgent,,
Am using textboxes to insert data into database,,,I want to insert textbox contents into database,,, but without using any button r click event,,,,, after filling the data into textboxes it should save contents automaticaly,,,
waiting for reply
|
|
|
|
|
method1
on last textbox lost foucos called save to database
method2
on form unload if there are text in any txtboxes save it to db
|
|
|
|
|
Thank u for ur reply,,,,
but here am using 2 text boxes,, first fld is mandatory,,n second is not,,,
if i use method 1--on last textbox lost foucos called save to database..
after entering the first time,,,if am goin to enter for sec time,, anycost i ve to click the second textbox as the control is in that text box,,, but i want,,after entering into the textbox itself, it should save for any click event on the page,,,
if i use method 2--on form unload if there are text in any txtboxes save it to db
as i told 1st fld is mandatory,, i need to display error msg for dat,,, but if i write in d formload itself,,error msg is showin at d form load itself..
is der any solution for this
thank u..
|
|
|
|
|
plz told me that you design this for web or desktop application.
if you are using web application tht page then you are rally doing wrong to save data without clicking button bcz in web every thing take place remotly on your sever that page request to server,while in desktop application this can be affordable,any how.
i am going to tell you method for both web and desktop application.
on text box lost focus save the data to globally declare variable in desktop application and web application use viewstate to save the first text box data.now if the user go to the next text box then on the lost focus of that text save to db both,otherwise if user close the form or come again to the first textbox save to db and clear the first textbox.
try this if any problem ask for help.
thanx
|
|
|
|
|
Hello Every body,
I want to make the only those items selected in list box whose value i retrieve from database.
i unable to do so,
i had set the selectionmode to multiple .
regards,
rahul saini
|
|
|
|
|
|
i have created a number of combo boxes according to my need.no i want to save the changes when any one click update button,but here the control did not find by findcontrol function.
Dim i, j, totc As Long, FcNo As String, cmbcat As Object, fid As ArrayList
catarry = New ArrayList
catarry = CType(ViewState("catgs"), ArrayList)
totc = CLng(ViewState("totcts"))
For i = 0 To totc - 1
'for category combo box
'cmbcat = New Object
'cmbcat = CType(Me.FindControl("catpp" & catarry(i * 3 + 1)), DropDownList)
'cmbcat = CType(Me.FindControl("catpp" & catarry(i * 3 + 1)), DropDownList)
'cmbcat = CType(Me.FindControl("catpp" & catarry(i * 3 + 1)), DropDownList)
If Not CType(Me.FindControl("catpp" & catarry(i * 3 + 1)), DropDownList) Is Nothing Then
FcNo = CType(Me.FindControl("catpp" & catarry(i * 3 + 1)), DropDownList).Text
End If
StrQry = "update category set cat_order=" & FcNo & " where cat_no=" & "catpp" & catarry(i * 3 + 1)
'Now check for all forums of category
fid = New ArrayList
fid = AllFunctions.PopToarraylist("select Forum_No from Forum where cat_no=" & catarry(i * 3 + 1), 1)
For j = 0 To fid.Count - 1
cmbcat = New Object
'cmbcat = CType(FindControl("frmpp" & fid(i)), DropDownList)
'cmbcat = CType(FindControl("frmpp" & fid(i)), DropDownList)
'cmbcat = CType(FindControl("frmpp" & fid(i)), DropDownList)
If Not CType(Me.FindControl("frmpp" & fid(i)), DropDownList) Is Nothing Then
FcNo = CType(FindControl("frmpp" & fid(i)), DropDownList).Text
End If
'cmbcat.Text
StrQry = "update Forum set Forum_Order=" & FcNo & " where forum_no=" & fid(i)
AllFunctions.UpdateQry(StrQry)
Next
Next
|
|
|
|
|
Where did you add the combo boxes to the Controls collection?
you must add them first in order to find them later.
|
|
|
|
|
i add these comboboxes to diferent dynamic created tables then add these tables to a place holder.you can see different findcontrol function in post i given.
i try following
placeholdername.findcontrol()
tablenames.findcontrol()
but fail.
i done radio button finding on similar technique that working properly but with drop down it not working.
|
|
|
|
|
hi,
i have a c# desktop application, i want to provide a link to download this application in my website
how can i do this.
and i need to show the progress of downloading also.
thanks in advance
My small attempt...
|
|
|
|
|
Hi,
Put your C# application in the wwwroot/Project folder, and use a an anchor tag.
Example:
in code behind, in the page_load (or another appropriate event) give the path of your C# application.
give the file path to the href property of the anchor control. I hope it will work.
Regards,
Blumen
|
|
|
|
|
thanks
My small attempt...
|
|
|
|
|
Hi friends,I have one text box on my form.i need to insert the data from tat text box to DB without clicking on any button.Now i have written the code under text changed event of that text box.So it is inserting whenever i click on that form.Besides this i need to insert data when i close tat window.But it is not inserting when i close tat window.Plse help me.Thanks in advance
With Regards
Lijo Rajan
|
|
|
|
|
Is Lijo Rajan and Tanvisha are some user.
Regards,
Satips.
|
|
|
|
|
I am new to .net and having some difficulties in debugging unmanaged Native DLL in .net..
I am using a Native COM DLL in ASP.Net web application. The problem is I am unable to degul my DLL in .NET. When I add a reference to DLL a interop DLL is created and when I try to load Symbol information manually I am unable to do so.
How can I Debug com DLL here ???
Please Help?
/A
|
|
|
|
|
In your application is there already the DLL is referenced pls check it out.
If the Dll is already referenced delete that one and try to reference the New Dll it will work fine.
Regards,
Satips.
|
|
|
|
|
I tried this but it doesn't work..
|
|
|
|
|
I have to validate my web page using java script. I have one dropdown list also . I need a javascript to validate weather any item in dropdownlist is selected or not. e.g ddlDrop is my dropdownlist.
To validate other controls I am using following
function validate()
{
if (document.getElementById("<%=txtUserName.ClientID%>").value=="")
{
alert("Please Pprovide UserName");
document.getElementById("<%=txtUserName.ClientID%>").focus();
return false;
}
if (document.getElementById("<%=txtPassword.ClientID%>").value=="")
{
alert("Please provide Password");
document.getElementById("<%=txtPassword.ClientID%>").focus();
return false;
}
seema
|
|
|
|
|
you should not use <%=field.client%> insteadyou should use the field name that you have in html page (page.aspx) . you can validate the dropdownlists in two ways:
1. using .value == '' (same way you are validatiing the other fields)
2. using selectedIndex == 0 (provided the first value is dummy e.g. Select One)
and you can access the form field names in two ways:
1. using document.getElementById('fieldname')
2. using form name document.formname.fieldname
-----
|
|
|
|
|
Hi seema, I hope the following code will work for you, if you have any queries please reply.
Assumptions: ListBox name is ListBox1
function ValidateListBox()
{
var varListBox = document.all('ListBox1');
var flag = false;
for(i = 0;i<varlistbox.length;i++)
{
="" if(varlistbox.options[i].selected="=" true)
="" alert("selected="" listbox="" item="" is="" '"="" +="" varlistbox.options[i].text+"'");
="" flag="true;
" }
="" }=""
="" if(flag="=" false)
="" alert("please="" select="" a="" item");
="" return="" false;
}=""
<div="" class="ForumSig">Thanks & Regards,
Partha.G
9989135551
|
|
|
|
|
Try This-:
function Check()
{
if(document.getElementById("<%=ddlDrop.clientID%>").value=="(Select One)")
{
alert('Please select a ddlDrop');
document.getElementById("<%=ddlDrop.clientID%>").focus();
return false;
}
}
Then call this Javascript on Page Load
btn.Attributes.Add("onclick", "return Check();")
If you have any Queries Please ask
Kartik Rathi
|
|
|
|
|
hi
i drog and drop a formView to my webPage and set datesource, but edit,delete,new buttons does not exist in it, how to solve my problem ?
|
|
|
|
|
While configuring your datasource, select Advance button option, and check those check boxes displayed in teh Advance dialog box.
cheers
|
|
|
|
|