|
Set the style width/ height to them.
But if you are using AdRotator you cant display two or more ads in one control. It comes one at a time.
So if you want to do this, create your own custom adrotator control which has this facility. Or you can use javascript to display more than one image as well..
|
|
|
|
|
Thanks for the reply
Can u please tell me the example.
|
|
|
|
|
|
|
public partial class admin_edit_sach : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
laysach();
}
}
private void laysach()
{
int masach = int.Parse(Request.QueryString["id"].ToString());
String StrCnn = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + Server.MapPath("~/App_Data/QLBansach.mdb");
OleDbConnection cnn = new OleDbConnection(StrCnn);
cnn.Open();
OleDbCommand cmd = cnn.CreateCommand();
cmd.CommandText = "select * from Sach where MaCD=" + masach;
OleDbDataAdapter da = new OleDbDataAdapter();
da.SelectCommand = cmd;
DataSet ds = new DataSet();
da.Fill(ds);
txtTenSach.Text = ds.Tables[0].Rows[0]["Tensach"].ToString();
DropChuDe.SelectedValue = ds.Tables[0].Rows[0]["MaCD"].ToString();
DropNXB.SelectedValue = ds.Tables[0].Rows[0]["MaNXB"].ToString();
txtDonGia.Text = ds.Tables[0].Rows[0]["Dongia"].ToString();
Calendar1.SelectedDate = ds.Tables[0].Rows[0]["Ngaycapnhat"].ToString;
FileUpload1.FileName = ds.Tables[0].Rows[0]["Hinhminhhoa"].ToString();
txtMoTa.Text = ds.Tables[0].Rows[0]["Mota"].ToString();
cnn.Close();
}
protected void Btupdate_Click(object sender, EventArgs e)
{
int masach = int.Parse(Request.QueryString["id"].ToString());
String StrCnn = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + Server.MapPath("~/App_Data/QLBansach.mdb");
OleDbConnection cnn = new OleDbConnection(StrCnn);
cnn.Open();
OleDbCommand cmd = new OleDbCommand();
cmd.Connection = cnn;
cmd.CommandType = CommandType.Text;
cmd.CommandText = "UPDATE Sach SET Tensach='" + txtTenSach.Text + "','" + DropChuDe.SelectedValue + "','" + DropNXB.SelectedValue + "','" + txtDonGia.Text + "','" + Calendar1.SelectedDate.Day + "/" + Calendar1.SelectedDate.Month + "/" + Calendar1.SelectedDate.Year + "','" + FileUpload1.FileName + "','" + txtMoTa.Text + "' Where MaNXB=" + masach;
cmd.ExecuteNonQuery();
cnn.Close();
Response.Redirect("~/Admin/ds_sach.aspx");
}
}
Erros
ompilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0428: Cannot convert method group 'GetType' to non-delegate type 'System.DateTime'. Did you intend to invoke the method?
Source Error:
Line 36: DropNXB.SelectedValue = ds.Tables[0].Rows[0]["MaNXB"].ToString();
Line 37: txtDonGia.Text = ds.Tables[0].Rows[0]["Dongia"].ToString();
Line 38: Calendar1.SelectedDate = ds.Tables[0].Rows[0]["Ngaycapnhat"].GetType;
Line 39: FileUpload1.FileName = ds.Tables[0].Rows[0]["Hinhminhhoa"].ToString();
Line 40: txtMoTa.Text = ds.Tables[0].Rows[0]["Mota"].ToString();
modified on Sunday, December 6, 2009 2:50 PM
|
|
|
|
|
Where is the parenthesis for this ??
Calendar1.SelectedDate = ds.Tables[0].Rows[0]["Ngaycapnhat"].ToString;
Should be
Calendar1.SelectedDate = DateTime.Parse(ds.Tables[0].Rows[0]["Ngaycapnhat"].ToString());
The parenthesis for ToString is missing ...
Cheers.
|
|
|
|
|
Try
Calendar1.SelectedDate =DateTime.Parse(ds.Tables[0].Rows[0]["Ngaycapnhat"].ToString());
|
|
|
|
|
Hi, I discovered Microsoft Chart Control a few days ago and have to say it's one of the greatest tool ever released . One that I found especially useful is the Dataformula.Financialformula function, which enables me to draw technical indicators on the chart.
However, is it possible to use the financialformula to return data as an array/arraylist?
I want to be able to put these technical data outputs into a database. So far I could only get the funciton to return output in a series, and I don't know how to convert the data in a series into an array/arraylist/datatable.
I'd greatly appreciate if anyone could help me out. Thanks!!
|
|
|
|
|
I have one quite simple website made by ASP.net, visual studio 2005, the website is nothing but just display 'hi'.
I just want to know how to us IIS for it. however, it gives the following error message:
This configuration section can not be used in this path. This is the case when the section is locked at a higher level. The closure takes place by default (overrideModeDefault = "Deny") is explicitly or with a location tag with overrideMode = "Deny" or the Legacyeinstellung allowOverride = "false" set.
anyone can tell me what is the problem? thanks!!
I have translated from German, the original information is as follows:
HTTP-Fehler 500.19 - Internal Server Error
Auf die angeforderte Seite kann nicht zugegriffen werden, da die zugehörigen Konfigurationsdaten für die Seite ungültig sind. Ausführliche Fehlerinformationen
Modul IIS Web Core
Benachrichtigung BeginRequest
Handler Noch unbestimmt
Fehlercode 0x80070021
Konfigurationsfehler Dieser Konfigurationsabschnitt kann in diesem Pfad nicht verwendet werden. Dies ist der Fall, wenn der Abschnitt auf übergeordneter Ebene gesperrt ist. Die Sperrung erfolgt standardmäßig (overrideModeDefault="Deny") oder wird explizit mit einem location-Tag mit overrideMode="Deny" oder der Legacyeinstellung allowOverride="false" festgelegt.
Konfigurationsdatei \\?\D:\publish_webtest\web.config
Angeforderte URL http://192.168.2.100:8080/
Physikalischer Pfad D:\publish_webtest
Anmeldemethode Noch unbestimmt
Angemeldeter Benutzer Noch unbestimmt
Konfigurationsquelle
97: </modules>
98: <handlers>
99: <remove name="WebServiceHandlerFactory-Integrated"/>
|
|
|
|
|
How did you hosted your site on IIS ? Did you create virtual directory properly ? Where is your web.config file located ?
Seraph_summer wrote: I have one quite simple website made by ASP.net, visual studio 2005, the website is nothing but just display 'hi'.
I just want to know how to us IIS for it.
1. Create Web site using Visual Studio.
Note : During creation of web site if you select File Location as HTTP, then it will also create the Virtual Directory at IIS.
2. After creation of Web site just published the site.
3. Goto Published folder. Then you can use Folder Web sharing option for create the virtual Directory or Open IIS manager to to create Virtaul Directory.
Here is one of my beginners article on IIS. It may help you to move ahead.
Beginner's Guide : Exploring IIS 6.0 With ASP.NET [^]
Let me know if you have any further issue.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
HI,
thank you very much!
I just repeat exactly as what you have introduced in your article "Deploying ASP.NET Websites on IIS 7.0"
, the same error gives, that is to say, the web.config has problem, I can not understand at all. because I just create a
default website based on ASP.net without doing anything.
frankly speaking, my website has been ready several months ago, I just want to publish it, but I do not how to publish it.
I really have no idea why it is not succeful. Could you please help me? what could be the reason?
I really hate IIS.
I am looking forward to your reply.
thanks again.
|
|
|
|
|
Hi, again me,
I found one potential prolem
to check the authorize, it displays the folloiwng informaitn,
"The server is configured to be used to access the specified physical path pass-through authentication with a predefined account. IIS Manager can not verify whether the built-in account has access. Make sure that the application pool identity has Read access to the physical path. If the server is connected to a domain, and the identity of the application pool "Network Service" or "Local System" is to make sure that has <domain> \ $ <computername> read access to the physical path. Try these settings again."
Do you think is this cause the problem? if so, then what does it mean exactly?
|
|
|
|
|
Hi guys.. Actually i have an web application running on vs2003 it fetches the records from a list of xml file now i want to import all my data that is present in the xml file to sql db(sybase).. can any one guide me as to how can i import the data using c# coding...
Thanks in advance...
|
|
|
|
|
Loop through the records and insert one by one to database.
Best wishes,
Navaneeth
|
|
|
|
|
Im a fresher actually.. i do accept ur idea.. hav u got any tutorials or samples... i googled alot dint get the apt one...
I tried using Sqlbulkcopy but that doesnt work with vs2003... and also there are duplicate rows in my xml files...
thanx in advance...
|
|
|
|
|
Ok. To read records from XML, use the classes provided in System.Xml name space. Work with XmlDocument[^] and load the XML to it. XmlDocument class provides methods to get collection of nodes. Start a loop that iterates over the collection.
To insert data into SQL database, you need to prepare insert SQL statement with necessary parameters. Then work with SqlConnection , SqlCommand classes. Execute the DB statement in each iteration of the loop. If you want to avoid duplicate records, create a primary key on the database table and when you try to insert duplicate records, SQL server will throw exception. Handle this and proceed to next row.
All the classes which I explained has got very neat documentation and you should be able to start easily.
<<thashif>> wrote: Im a fresher actually
<<thashif>> wrote: i googled alot dint get the apt one..
While searching on the Internet is good, as a fresher you should be learning stuff initially from a book. Not all the stuff in Internet are correct and reading from a book makes real difference. So I suggest you to get a good book on the subject and start working with the examples rather than wasting time on online forums or doing search.
Best wishes,
Navaneeth
|
|
|
|
|
When internet explorer opens my dotnet code should identify that. How can we do that? Please help me with this.
|
|
|
|
|
srikantha_nagaraj wrote: When internet explorer opens my dotnet code should identify that.
When you post questions you should identify correct forum.
srikantha_nagaraj wrote: Please help me with this.
Your question is terribly unclear and off topic to this forum. If your question has anything to do with ASP.NET, explain it clearly. If not, move to correct forum.
Best wishes,
Navaneeth
|
|
|
|
|
No way... If you are talking about process in the client side, it cant detect it from the browser.. As browser only deals with htmls(Request / Response). It dont have access to anything, but just to display some Data and Ui elements.
If you are looking for server side processes, it is very easier to deal with this. Just use
System.Diagnostics.Process[] processlist = System.Diagnostics.Process.GetProcesses()
But I dont think your motive is fulfilled using this as no one opens internet explorer to work with their own site in the server.
Anyway.. Be specific on what you require always. And post in right section.
Cheers.
|
|
|
|
|
Abhishek Sur wrote: If you are looking for server side processes, it is very easier to deal with this. Just use
System.Diagnostics.Process[] processlist = System.Diagnostics.Process.GetProcesses()
I doubt this. ASP.NET process runs on a restricted account and will not have full trust. GetProcesses() method is likely to fail if invoked from ASP.NET application.
Best wishes,
Navaneeth
modified on Sunday, December 6, 2009 8:21 AM
|
|
|
|
|
Yes.. But I guess giving proper rights to the user (or impersonating) to run the aspnet worker process as an administrator will surely solves the issue ..
But seriously... this is not generally what we do often... but it is possible I guess.
Cheers..
|
|
|
|
|
srikantha_nagaraj wrote: When internet explorer opens my dotnet code should identify that.
Why do you need that ? Do you need it for an ASP.NET Application or any win Application ?
srikantha_nagaraj wrote: Please help me with this.
Please be specific while asking any question so that we can help you at best !!
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
hi all,
i know this is not a windows app forum but i want to pass querystring from my web page and fetch it into my windows application.
I am using some 3rd party tool web GUI for my windows app to run it as web application.
Plz help.....
|
|
|
|
|
bhavnvyas wrote: I am using some 3rd party tool web GUI for my windows app to run it as web application.
Then You better ask third pary tool developing team..!
As you are using the 3rd party tool first check tht it is supported for such type..!
BTW You didnt mention the 3 rd party vendor name so tht if any one uses the 3rd party tool before they can help You..!
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
thnx for reply
but WebGUI itself is a my tool.
leave it neways but wat if i am developing somt web gui application in windows app thn how to fetch querystring data...plz help....
|
|
|
|