|
yes because i am also using a list control every time when i refresh the page the data should be in it without repeating....
|
|
|
|
|
So you are selecting an item from the datalist and then it is posting back?
Well what do you want to do with that item from the datalist? Why are you posting back?
|
|
|
|
|
Hello. May be you can help me. I've an aspx page PageA and inside of it an iFrame to a page PageB. The PageB has a login. I want from PageA complete the input for login and click on Login Button. How can I do that from PageA usig ASP.Net??
Thanks a lot.
|
|
|
|
|
You can't. The frames only exist at the client side, so you can't do anything with them on the server side. You have to use client side script to access the iframe, i.e. Javascript.
Also, to access the PageB from PageA they have to be in the same domain. If you are loading a page from a different domain, you can't do anything at all to it.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
hi,
i have my website developed in classic or simple ASP and now they want to introduce MS Visual studio 2008.my problem here is they want to add only some function like they want me to add a button where in if i click it it has to store the data in the database.MY problem here is i am very much worried how am i going to do only a part of a already existing web page in ASP.NET.is it possible to do that???can we just add a button to the website using .net??? please help me out .. my job depends on this now.. please anyone i will be very grateful for ur help
thank you
D
|
|
|
|
|
One idea is to set an iframe on that area and call required aspx page.
|
|
|
|
|
Hello to all
I'm using VS 2008.
I have a masterPage with a variable int PageCodec
on the page son doing the following code
master page = (this.Master as master);
page.PageCodec = 1
The system execute without probleman but when I go to so object page is null and an error of not referenced object, if the code in place come watch
The type 'master' exists in both
There is a folder named App_Code and inside it there's a class that manages session (When a user is logged in and someone tries to log using the same user class that is currently been used, this class doesn't allow it.)
So I clicked on the project with the right mouse button on the option Convert to Web Application, and the folder App_Code was renamed to Old_App_Code.
Now the error that happened in the previous post does not happen anymore, it works perfectly, but I could not understand what happened. Is it a new standard for VS 2008? What I have to do with the Old_App_Code? and Where should I put my class Session?
can someone help me?
thanks.
|
|
|
|
|
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.
|
|
|
|