|
Respected Sir/Madam,
I am creating a web site by ASP.Net.
I have one COM dll on remote machine at a specific path. This dll is registered by regsvr32.exe on remote machine.
I want to check whether dll is registered or not. How can I check it by C#.Net program?
Please suggest.
Thanks in advance
|
|
|
|
|
Hi all,
I'm using Response.Writefile to transmit a file to the client; the method works on one server, but on another with seemingly identical configuration, it sends an empty file - correct name, etc, but no content. No error message. I've tried setting content-length to no avail, and I'm using pretty standard code - and before you ask, yes, the file has something in it. Anyone have any prior experience with this?
Thanks,
Steve
|
|
|
|
|
Deleting Response.Close() in my code and moving the code to override the page render command fixed the issue. Why this would only show up on some servers I can't say.
|
|
|
|
|
Hi,
I have created a web part which contains a Tree control. This control shows some items under a product. I have created a custom property says "Product Name". User can set this property for web part. Then items under this product will get display as tree nodes.
The problem is if I change Product Name and click on some other link in Sharepoint site and come back to this page, tree will show items under specified product but if I change product name and click on OK on the property section, page is getting refreshed but it still shows previous tree. Mean to say web part is not getting refreshed.
I checked few blogs which have mentioned about this problem but didn't give any solution.
Please help me by posting the solution.
Thanks And Regards.
|
|
|
|
|
how can i dynamically add rows in gridview without postback
“You will never be a leader unless you first learn to follow and be led.”
–Tiorio
"Coming together is a beginning, staying together is progress, and working together is success." Henry Ford
|
|
|
|
|
|
It depends on what you mean by dynamic. If you want to dynamically add rows on the server side and you are binding to a DataTable/Collection you can add rows to the DataTable/Collection and then re bind the GridView.
|
|
|
|
|
i know it is javascript buthow can i used it in gridview.
what i want is that
there is a button
when i click on this button a new row should be added
without post back.
“You will never be a leader unless you first learn to follow and be led.”
–Tiorio
"Coming together is a beginning, staying together is progress, and working together is success." Henry Ford
|
|
|
|
|
can any one please guide me that i am facing a problem in matching function parameter value and a string value in javascript.
function parentfunction(userid,username,dept,status)
{
var status1="Active";
alert(status1); ->displays Active
alert(status); ->displays Active
if(status == status1)
{alert("ok");}
else
{
alert("no"); ->always displayed.....
}
}
in both alert values are same but else case alert is raised all the time whether the values are same or not...
umerumerumer
|
|
|
|
|
The second status variable will have some whitespaces.
|
|
|
|
|
Thank you soo much yes problem has been solved....
umerumerumer
|
|
|
|
|
Hi Friends,
Is it possible to implement a DHTML drag and drop reordering (Sorting) in a HTML select control.
A
B
Its easy to perform such functionalities with UL and DIV, but as per our requirement we need this functionality in a Select control
Thanks in Advance
|
|
|
|
|
I haven't tried it but it may be possible with Rico[^].
|
|
|
|
|
plese any one help me ,
i doing work on asp.net ,ms access database but when doing programing for wieght and price wise dearch data then it gave error .data type mismatch ,
how it solve my code is
if (chkWeight.Checked == true)
{
if (strMetal != "" && strType != "" && FromWieght != 0 && ToWieght == 0)
{
cmd1 = new OleDbCommand("select * from DtlItem where CategoryID=@CategoryID and Wieght >='" + FromWieght + "' and MetalID IN (select MetalID from MetalMaster where Name='" + strMetal + "') and TypeID IN (select TypeID from Type where Name='" + strType + "')", myAccessConnection);
}
else if (strMetal != "" && strType != "" && FromWieght == 0 && ToWieght != 0)
{
cmd1 = new OleDbCommand("select * from DtlItem where CategoryID=@CategoryID and Wieght <='" + ToWieght + "' and MetalID IN (select MetalID from MetalMaster where Name='" + strMetal + "') and TypeID IN (select TypeID from Type where Name='" + strType + "')", myAccessConnection);
}
else if (strMetal != "" && strType == "" && FromWieght != 0 && ToWieght != 0)
{
cmd1 = new OleDbCommand("select * from DtlItem where CategoryID=@CategoryID and Wieght beween '" + FromWieght + "' and '" + ToWieght + "' and MetalID IN (select MetalID from MetalMaster where Name='" + strMetal + "')", myAccessConnection);
}
else if (strMetal == "" && strType != "" && FromWieght != 0 && ToWieght != 0)
{
cmd1 = new OleDbCommand("select * from DtlItem where CategoryID=@CategoryID and Wieght beween '" + FromWieght + "' and '" + ToWieght + "' and TypeID IN (select TypeID from Type where Name='" + strType + "')", myAccessConnection);
}
else if (strMetal!="" && strType!="" && FromWieght!=0 && ToWieght!=0)
{
cmd1 = new OleDbCommand("select * from DtlItem where CategoryID=@CategoryID and Wieght beween '" + FromWieght + "' and '" + ToWieght + "' and TypeID IN (select TypeID from Type where Name='" + strType + "') and MetalID IN (select MetalID from MetalMaster where Name='" + strMetal + "')", myAccessConnection);
}
else if (FromWieght == 0 && ToWieght != 0)
{
cmd1 = new OleDbCommand("select * from DtlItem where CategoryID=@CategoryID and Wieght <='" + ToWieght + "' ", myAccessConnection);
}
else if (FromWieght != 0 && ToWieght == 0)
{
cmd1 = new OleDbCommand("select * from DtlItem where CategoryID=@CategoryID and Wieght >= '" + FromWieght + "'", myAccessConnection);
}
else if (FromWieght != 0 && ToWieght != 0)
{
cmd1 = new OleDbCommand("select * from DtlItem where CategoryID=@CategoryID and Wieght between '" + FromWieght + "' and '" + ToWieght + "'", myAccessConnection);
//// cmd1.Parameters = CommandType.Text;
// OleDbParameter From_Wieght = new OleDbParameter("@FromWieght", OleDbType.Numeric);
// From_Wieght.Value = FromWieght;
// cmd1.Parameters.Add(From_Wieght);
// OleDbParameter To_Wight = new OleDbParameter("@ToWight", OleDbType.Numeric);
// To_Wight.Value =ToWieght ;
// cmd1.Parameters.Add(To_Wight);
}
}
else if (strMetal != "Select Item" && strType != "Select Item")
{
cmd1 = new OleDbCommand("select * from DtlItem where CategoryID=@CategoryID and TypeID IN (select TypeID from Type where Name='" + strType + "') and MetalID IN (select MetalID from MetalMaster where Name='" + strMetal + "')", myAccessConnection);
}
else if (strMetal == "Select Item" && strType != "Select Item")
{
cmd1 = new OleDbCommand("select * from DtlItem where CategoryID=@CategoryID and TypeID IN (select TypeID from Type where Name='" + strType + "')", myAccessConnection);
}
else if (strMetal != "Select Item" && strType == "Select Item")
{
cmd1 = new OleDbCommand("select * from DtlItem where CategoryID=@CategoryID and MetalID IN (select MetalID from MetalMaster where Name='" + strMetal + "')", myAccessConnection);
}
else
{
cmd1 = new OleDbCommand("select * from DtlItem where CategoryID=@CategoryID", myAccessConnection);
//OleDbParameter From_Wieght = new OleDbParameter("@FromWieght", OleDbType.Integer);
//From_Wieght.Value = 312434;
//cmd1.Parameters.Add(From_Wieght);
}
int CatID = Convert.ToInt16(ViewState["CatID"]);
// cmd1.Parameters = CommandType.Text;
OleDbParameter Cat_ID = new OleDbParameter("@CategoryID", OleDbType.Integer);
Cat_ID.Value = CatID;
cmd1.Parameters.Add(Cat_ID);
OleDbDataAdapter adp = new OleDbDataAdapter(cmd1);
DataSet ds = new DataSet();
myAccessConnection.Open();
|
|
|
|
|
Hi
I wrote these code for changing the language of my site.the default language of site is Farsi,and i put two link button in master page for switching the language , and i have two css ,one for Farsi and one for English.when the page load and when i click on en link button ,the language change but the css doesn't change ,I don't know why?
in all page except master page i wrote:
protected override void InitializeCulture()
{
if (Session["lang"] != null)
{
string selectedlang = Session["lang"].ToString();
UICulture = selectedlang;
Culture = selectedlang;
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(selectedlang);
Thread.CurrentThread.CurrentUICulture = new CultureInfo(selectedlang);
}
base.InitializeCulture();
}
in masterpage in click event of link buttons
protected void LinkButton1_Click(object sender, EventArgs e)
{
Session["lang"] = "en-US";
Server.Transfer(Request.Url.PathAndQuery, false);
type='text/css' />";
}
protected void LinkButton2_Click(object sender, EventArgs e)
{
Session["lang"] = "fa-IR";
Server.Transfer(Request.Url.PathAndQuery, false);
type='text/css' />";
}
and in page load of master page:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (Session["lang"] == null)
{
this.Literal1.Text = "<link href="fa.css" rel="stylesheet" type="text/css" />";
}
else
if (Session["lang"].ToString() == "en-US")
{
this.Literal1.Text = "<link href="fa.css" rel="stylesheet" type="text/css" />";
}
else
if (Session["lang"].ToString() == "fa-IR")
{
this.Literal1.Text = "<link href="fa.css" rel="stylesheet" type="text/css" />";
}
}
asp:Literal ID="Literal1" runat="server">
|
|
|
|
|
strawberrysh wrote: if (Session["lang"] == null)
{
this.Literal1.Text = "";
}
else
if (Session["lang"].ToString() == "en-US")
{
this.Literal1.Text = "";
}
else
if (Session["lang"].ToString() == "fa-IR")
{
this.Literal1.Text = "";
}
Because your calling same CSS class fa.css for each condition
Where is the another Css ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
Hy,
I m tryng to retrive image from database. the code dosent giv ane run time error but the image is not displayed
Response.ContentType = "image/jpeg";
Stream strm = ShowEmpImage(8);
byte[] buffer = new byte[4096];
int byteSeq = strm.Read(buffer, 0, 4096);
strm.Read(buffer, 0, 4096);
Response.BinaryWrite(buffer);
}
public Stream ShowEmpImage(int a)
{
SqlConnection connection = new SqlConnection();
connection.ConnectionString = "Data Source=SERVER;Initial Catalog=image;Persist Security Info=True;User ID=sa;password="";
connection.Open();
string sql = "SELECT picture FROM image where id='" + a + "' ";
SqlCommand cmd = new SqlCommand(sql, connection);
object img = cmd.ExecuteScalar();
return new MemoryStream((byte[])img);
}
plz help
|
|
|
|
|
Just a little pointer.
Its better to store just the image location in the database rather than the whole image as it tends to bloat the database.
|
|
|
|
|
My name is santhosh. i jsut started my Dot Net Class. can you send me a sample project about the student details.I want to know how to update, edit and cancel the details in a grid view .I using Microsoft Access as data base.
MY PROJECt DETAILS
default.aspx
...........
Name txtbox
Age txtbox
Address Txtbox
Email TxtBox
Gender radio btn male, raduiobtn female
Qualification chkbox Bsc,Chkbox MSc,chkboxBe
Save Button
................................................................................
default2.aspx
Name txtbox
Age txtbox
Address Txtbox
Email TxtBox
Gender radio btn male, raduiobtn female
Qualification chkbox Bsc,Chkbox MSc,chkbox BE
Update button & cancel button
.......................................................................................
Grid.aspx
Grid view
...............................................................................
Looking forward hearing from you soon
|
|
|
|
|
This sounds like you asking for somebody to do your homework for you...
Normally, you attempt to do the project yourself, and when you have problems with a specific part, you ask for help (or search Google).
|
|
|
|
|
santhoshasokan wrote: I want to know how to update, edit and cancel the details in a grid view
In which case I suggest either a good book or use Google. This forum does not do homework - there is no point, if someone here did it you would not learn anything, and I may end up fixing your crap code.
So try on your own and post any SPECIFIC questions for assistance.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
hi
i my website i m using a user control,which contains 3 dropdown list boxes and i set postback property for dropdownlist as true.when i select an item in the dropdown list then the user control disappears
plz help me
how to overcome this problem
i m adding the user control at runtime
thanks in advance
vijay kumar D
|
|
|
|
|
Can you post here block of code in which method you are adding the User Control ?
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
hi
i have datagrid where i display data and i have set AutoGenerateDeleteButton="true" AutoGenerateEditButton="true".when i click edit on gridview once it doesn't show upadte and cancel,it only shows when i click for second time.
here is my code
protected Sub GridView1_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GridView1.RowEditing
GridView1.EditIndex = e.NewEditIndex
CType(GridView1.Rows(e.NewEditIndex).FindControl("ddlgvclients"), DropDownList).Enabled = True
CType(GridView1.Rows(e.NewEditIndex).FindControl("ddlgvregions"), DropDownList).Enabled = True
CType(GridView1.Rows(e.NewEditIndex).FindControl("ddlgvservices"), DropDownList).Enabled = True
End Sub
Mamphekgo
|
|
|
|
|
Hi
I have a query which is ran from my aspx page.
The query is ordered by a field which contains the letters 'y' and 'n'
Now when the letter is not a capital it orders fine, but when the letter is a capital it doesnt order properly.
Why is this?
any help would do.
thanks
|
|
|
|