|
Hard to say, based on this. Download Firebug for firefox and then you can step through and debug this code yourself.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
hai
i want to how to add tinymce to my asp.net website in vb.pls help me .
i already downloaded the tinymce package.
thanks in advance
|
|
|
|
|
They have examples[^] and a forum[^]. The odds are much greater of talking to people who have used it there, than here.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
hi
every one .actually i was using ms access in my previous projects.but now i am using sql server 2005.
but whan i am run my application i got this error:
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
my code is this;
SqlCommand cmm;
SqlConnection con;
SqlParameter p1, p2;
protected void Page_Load(object sender, EventArgs e)
{
cmm = new SqlCommand("getsal");
con = new SqlConnection("initial catalog = master; data source =localhost");
cmm.Connection = con;
p1 = new SqlParameter();
p2 = new SqlParameter();
p1.ParameterName = "@eid";
p2.ParameterName = "@esal";
p1.SqlDbType = SqlDbType.Int;
p2.SqlDbType = SqlDbType.Int;
p1.Direction = ParameterDirection.Input;
p2.Direction = ParameterDirection.Output;
cmm.Parameters.Add(p1);
cmm.Parameters.Add(p2);
cmm.CommandType = CommandType.StoredProcedure;
//con.Open();
//p1.Value = Int32.Parse(TextBox1.Text);
//cmm.ExecuteNonQuery();
//con.Close();
//TextBox2.Text = p2.Value.ToString();
}
protected void Button1_Click(object sender, EventArgs e)
{
con.Open();
p1.Value = Int32.Parse(TextBox1.Text);
cmm.ExecuteNonQuery();
con.Close();
TextBox2.Text = p2.Value.ToString();
}
}
plz advice me:
thanks
gaurav
|
|
|
|
|
To connect to SQL Server, you need to specify a username and password or that you're using your credentials on your windows machine . If you use your credentials it could create issues as you move the code to the server.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
thanks for the response
actually i have sql server 2005. and i want to run only at my own system.not at the remort server.i am using window autentication .which does not require username and password.
and the configiration which i have for sql server is;
server type: database engine
server name: GAURAV\SQLEXPRESS
autantication :window authantication
now plz tell me what should i do.
and tcp/ip is also enable
thanks...gaurav
|
|
|
|
|
Hi
I am using a Modal Popup control which is attached to a button.
However I also have a a required field validator control which is attached to a radio list.
When the button is clicked and no option is chosen from the radio list the required field validator should fire, but it doesnt.
It fired the modal popup and the validator fires in the background.
How can I make the validator fire ahead of the modal popup?
thanks!
|
|
|
|
|
In button click event set the TargetControlId of the modalpopupextender to that button.
E.g.if (RequiredFieldValidator1.IsValid)
{
ModalPopupExtender1.TargetControlID = "Button1";
ModalPopupExtender1.Show();
}
Make sure that you set the TargetControlId to some dummy id, which is hidden in design.
Hope this will helpful to some extent to solve the problem.
|
|
|
|
|
The problem is I cant seem to reference the controls in the backend code.
When I try the above I get the error message
'AtlasControlToolkit.ModalPopupExtender' does not contain a definition for 'TargetControlID'
Even though my control works fine in the front end code
thanks anyway
|
|
|
|
|
You can set the TargetControlId in design with the hidden(dummy) buttonid.
|
|
|
|
|
Hello all,
I am having a datalist which contain a image and a checkbox list inside the div tag. On page load i am binding all the data to datalist and checkboxlist and on page load i am making div visibility to false. Now on click of image i need to enable div property to visible (block). how can i do this. I have write the javascript function on click on image tag but the div tag is inside tha datalist so javascript function cant find the div so content in div (checkboxlist) not displaying. Please tell me how can i solve the problem.
Thanks
Rahul
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
You find the div with document.getElementById
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Hi,
I have used document.getElementById in my javascript function but it dose not find the div tag.
I think this is because of DIV tag is inside the datagrid. My javascript
function is as follow.
function Display()<br />
{<br />
alert("hello");<br />
document.getElementById('tree').style.display = 'block';<br />
}
Thanks
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
rahul.net11 wrote: I think this is because of DIV tag is inside the datagrid
Yeah, that's the problem. You need to prefix datalist id with your div id if div is marked to runat server.
|
|
|
|
|
Hi i am using view state in my form,
its carrying lot of datas...,
one of my senior suggest dont go for viewstate...,
It will make probs for iis cache...,
is it true?,
if we use view state it will be probs for iis cache?,
if yes give me some other way to solve this...,
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
Well, yes, the big issue with viewstate is simply that it gets sent to the client every time, making your pages too big. So, try to limit what you store, for example, store an id and use that to get the rest of your data out of the database. Session state is another option, but that can also be overused.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
so can i go for the datatable or it also similar to viewstate?
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
I suggest buying a book on ASP.NET and reading it. It seems you're using a framework when you have no idea what it does.
Why would values stored in your database get sent to your client ? No, they don't. The client gets the id in viewstate, and you use that to pull out values from the DB on the server.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Ya actually i am entering some datas in mu=y forms,
its having lot of datas...,
After that i am adding some more records to my gridview using view state
Now all the records i have to pass to my database at a time...,
I didnt get any records from my database and storing it in view state...,
I am doing using viewstate i storing the records to db..,
Thats y i asked viewstate and datatable both will disturb iis cache or not...,
As per graus instruction he said view state will be disturb iis cache...,
So thats y i asked instead of that viewstate can i go for datatable
sorry if anything wrong in my question
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
New one wrote: So thats y i asked instead of that viewstate can i go for datatable
Do you know HTTP is stateless. How are you hoping to keep data on a datatable ? That's why CG said to get a good book on ASP.NET.
New one wrote: After that i am adding some more records to my gridview using view state
Now all the records i have to pass to my database at a time...,
Why don't you iterate the grid items and store it to DB one by one ?
|
|
|
|
|
New one wrote: its carrying lot of datas...,
When you say its carrying a lot of data can you clarify that?
How can we help you suggest something when you provide us with vague information.
I use session on my application but I am only using 5 so its not overloading my app but say you need 100 then thats a problem.
|
|
|
|
|
Ya actually i am entering some datas in mu=y forms,
its having lot of datas...,
After that i am adding some more records to my gridview using view state
Now all the records i have to pass to my database at a time...,
I didnt get any records from my database and storing it in view state...,
I am doing using viewstate i storing the records to db..,
Thats y i asked viewstate and datatable both will disturb iis cache or not...,
As per graus instruction he said view state will be disturb iis cache...,
So thats y i asked instead of that viewstate can i go for datatable
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
Sorry but I don't understand most of the post above.
I cant suggest anything else
|
|
|
|
|
i have developing software in asp.net. i am using xml file in this sofware e.g server.mappath(""); when this software run on the iis show error
Could not find a part of the path 'C:\WINDOWS\system32\xmlFiles\customer.xml'.
please tell me how resolve this error.
|
|
|
|
|
Sounds like your code is broken. Have you stepped through to try to work out what's going on ? Could you consider posting the code you want us to fix for you ?
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|