|
hmmm, how can I use this (modalpopupextender)??
thanks...
|
|
|
|
|
It's part of the ajaxtoolkit.
I'm thinking it might even be better to use the ConfirmButton. Below is the url on how it all works.
http://www.asp.net/AJAX/AjaxControlToolkit/Samples/ConfirmButton/ConfirmButton.aspx
|
|
|
|
|
I created updated panel with button when click on button in update panel total page is reloaded,Then What is the use of Updated Panel?
www.funnydotnet.co.cc for dotnet developers
Best Regards
Rajesh Kumar Chekuri
www.rajeshchekuri.co.cc
|
|
|
|
|
The whole ASP.NET AJAX library is there for people who can't be bothered learning how to use AJAX themselves. It works just fine, if your needs are not high traffic or finely grained. I guess you must be doing it wrong.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
You need to put a trigger on the update panel so it refreshes the updatepanel when the button is clicked.
<triggers> <asp:asyncpostbacktrigger controlid="NAME OF YOUR BUTTON" eventname="Click" xmlns:asp="#unknown">
|
|
|
|
|
hello
i've getted the following from a site :
private static object ThisLock = new object();
object dataObject = Cache["globalData"];
lock(ThisLock)
{
if( dataObject == null )
{
//Get Data from db
GlobalObj globalObject = GlobalObj.GetData();
Cache["globalData"] = globalObject;
}
}
return globalObject;
but what i need is :
if 2 session access the following code in the same time, does the second wait the first to the locked block and then execute the same code or do not execute the code and pass away from
dghdfghdfghdfghdgh
|
|
|
|
|
I'm not exactly sure about what you are trying to ask, but...
If a thread comes to a lock section that another thread has entered, it will wait until the other thread exits the section.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Does anyone know how to display a web page through a modal popup? I need for it to be dynamic as the web page will be different depending on what the user clicks.
Thanks so much for everyones help.
|
|
|
|
|
Thanks for looking
I know this is not an asp.net question, but someone migh have done this before
Im using googlemaps, when you run it as localhost, the validation key works, no matter the url of the site
I need to test this app from another pc and i access it by the ip 192.168.1.65, the thing is that when i access the page with the map, the map sends me an alert saying the key is not valid
The solution would be to access the site from another computer as localhost, since localhost points to the same computer, i need it to point to 192.168.1.65
I tryed changing the drivers\etc\hosts but it doesnt work, is this even posible??
Thanks in advance
Alexei Rodriguez
|
|
|
|
|
string Code = "select Code from ds1 "
string s;
using (SqlCommand command = new SqlCommand(Code, conn))
{
s = (string)command.ExecuteScalar();
}
string update = " update ds1 set name='asd' where Code='" + s + "'";
In above code give the datatype conversion error. e.g. :
Unable to cast object of type 'System.Int64' to type 'System.String'.
I declared code column as a bigint datatype.
|
|
|
|
|
string update = " update ds1 set name='asd' where Code='" + s.ToString() + "'";
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
As-salam-wa-alaikum!
this gives same error as mentioned above code. error message appeared on
s=(string)command.executescaler();
this line.
|
|
|
|
|
What Datatype is the Field "Code" in the Database?
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
hi! sir
I declared
bigint datatype.
|
|
|
|
|
then it Should look like this
string Code = "select Code from ds1 " ;
int s;
using (SqlCommand command = new SqlCommand(Code, conn))
{
s = (int)command.ExecuteScalar();
}
string update = " update ds1 set name='asd' where Code='" + s + "'";
Am not Sure what you are doing, but if i were to write your type of code, i would do it like this
public int GetData()
{
int Code;
String strCon = "blablablablablablabla";
SqlConnection con = new SqlConnection(strCon);
SqlCommand cmdselect = new SqlCommand();
cmdselect.CommandText = "select Code from ds1";
cmdselect.Connection = con;
try
{
con.Open();
Code = (int)cmdselect.ExecuteNonQuery();
}
catch(SqlException)
{
throw;
}
finally
{
con.Close();
}
return Code;
}
hope it Helps
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
The ExecuteScalar method returns an Int64 boxed in an object. You can only unbox this value as an Int64 value:
long code = (long)command.ExecuteScalar();
If you want this value as a string, you use the ToString method:
s = code.ToString();
Now, to answer the next question that you would have asked:
As the code field is a bigint, you should not use apostrophes around the value in the update query.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Thanx a lot! my problem has been solved.
Actually I want to discuss one more problem.
I have a column which contains comlete path of a filename. My requirement is that i want to fetch only filename in running mode.
I use this following query, but it is not give the output.
string code = "select * from path";
string s;
using (SqlCommand command = new SqlCommand(code, conn))
{
conn.Open();
SqlDataReader dr;
dr = command.ExecuteReader();
dr.Read();
string s1 = dr.GetValues(0);
s=s1
conn.Close();
}
string filename = Path.GetFileNameWithoutExtension(s);
SqlDataAdapter da = new SqlDataAdapter(filename, conn);
da.Fill(ds, "a");
DataList1.DataSource = ds.Tables["a"];
DataList1.DataBind();
}
thanx again
|
|
|
|
|
ahmad25 wrote: SqlDataAdapter da = new SqlDataAdapter(filename, conn);
The filename isn't an SQL query, is it? Also, the connection is closed. What is it that you are trying to do here really?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
I have a column which contain a complete Path. Like-->: d:\folder\folder1\pic.jpg and so on:
I want to print only filename like "pic" and show them in a datalist. in datalist i take linkbutton To display all value.
hopefully, I think u understand.
|
|
|
|
|
Change the line
s = (string)command.ExecuteScalar();
to
s = command.ExecuteScalar().ToString();
|
|
|
|
|
thanx a lot!
your query is correct.
|
|
|
|
|
Hi guys
I am making a string builder and this string i have to sent on Email
local its working fine while uploading its giving error "A page can have only one server-side Form tag. "
while in my application i am rendering a panel (panel id =panel1)
after that i am using tag
vb.net code
Dim sbr As New StringBuilder
sbr.Append("")
Dim swr As New StringWriter(sbr)
Dim htw As New HtmlTextWriter(swr)
panel1.RenderControl(htw)
sbr.Append(" ")
sbr.Append("Warm Regards.. ")
sbr.Append("")
and html code
<asp:panel id="panel1" runat="server" width="90%" xmlns:asp="#unknown">
so what is issue plz help any one
krishna veer singh
|
|
|
|
|
Are you using Master pages ?
do one thing, check if you master page already contain a form tag. if not then remove it from your child page and put it on masterpage.if yes then remove it from your child pages
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
no i am not using master page
krishna veer singh
|
|
|
|
|
Did you try HTML Encode/Decode with manipulated string ?
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|