|
well.. it's just the "proper" way to do it in Visual Studio!! VS will underline it in red and tell you it's not a valid property - which it isn't of the server control; it's only when the page renders it as an html control that it becomes so.
|
|
|
|
|
Fair enough. I'd tend to do it inline because I'd regard it as cleaner, and not be dictated to by the IDE. but, your way works, no doubt.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Phil,
Where in the code behind should I add the attribute to the collection? Page_Init()?
|
|
|
|
|
I have a DataSet with two tables with a relationship.
dataSetNodeData.Relations.Add(new DataRelation("Relationship",
dataTableTransmittal.Columns["Node ID"],
dataTableDocuments.Columns["Parent"]));
This is working, but now the customer have changed the indata so Parent is now a commaseparated string with id numbers so the same document can belong to several Node ID's.
Can I make the DataRelation work with a commaseparated string? Or do I have to rewrite my application totaly?
|
|
|
|
|
No, that's not going to work. You need to rethink your architecture. I suspect you need to change your dataTableDocuments to have a record per parent id, even if they are stored as a csv. I'd say don't store them that way in the first place, just add records for each parent relationship.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Yes, that's the way I thought that I hade to go.
I can't affect the indata as it is a export (xml) from a CMS system.
|
|
|
|
|
I have 5 radiobuttons. When i select one, it should be made bold. Other radiobuttons should be displayed with normal font. How to achieve this?
|
|
|
|
|
javascript. Handle the event and then use JS to bold the text. The text is in a label, it's actually not part of the radio button in HTML, so there's some hoops you'll need to jump through.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
here is my code :
row["ReductionDetails"] = row["ReductionDetails"] + "" + Value
+ "% of " + GetProductNameById(ProductId) + '\n';
what i want to get :
< td >
MY FIRST LINE
MY SECOND LINE
< /td >
there is no result with : '\n' and what i got : MY FIRST LINEMY SECOND LINE
i tried the "< br / >" and what i got : MY FIRST LINE < br / >MY SECOND LINE
|
|
|
|
|
\n is a waste of time in a website. If the br tag is shown then it's being escaped.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
How I can upload doc files in ASP.Net and later retieve it using Gridview control.please specify complete code along with necessary table to be built in SQL Server 2005 Express Edition
|
|
|
|
|
shreesh_9 wrote: please specify complete code along with necessary table to be built in SQL Server 2005 Express Edition
Dream on, buddy, we're not here to do your work for you.
If you don't want to display the contents of the doc file, it's pretty trivial. You use an upload control, which is the only way to upload a file, then you store it as a blob with an id in the database. Then you make your download URL pass the id, get the blob from the DB and send it to the user.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi, I am getting the following error by reading the data from CSV file to dataset.
"'C:\Documents and Settings\satish.gorijala\Desktop\csvData.csv' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides"
string _filepath = @"C:\Documents and Settings\satish.gorijala\Desktop\csvData.csv";
string _fileexten = Path.GetExtension(_filepath);
string strConn = "";
if (_fileexten == ".csv")
{
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + _filepath + ";Extended Properties='text;HDR=Yes';";
}
OleDbConnection oledbconn = new OleDbConnection(strConn);
oledbconn.Close();
oledbconn.Open();
OleDbDataAdapter myCommand = new OleDbDataAdapter("SELECT * FROM [Sheet1$]", oledbconn);
DataSet myDataSet = new DataSet();
myCommand.Fill(myDataSet, "ExcelInfo");
dt = myDataSet.Tables[0];
oledbconn.Close();
myCommand.Dispose();
G. Satish
|
|
|
|
|
Satish - Developer wrote:
"'C:\Documents and Settings\satish.gorijala\Desktop\csvData.csv' is not a valid path
This is just a guess, and don't quote me or anything, but at a push i'd hazard a guess that it could possibly be that the path specified does not exist.
Once again, just a guess and all.
|
|
|
|
|
i show my files in gridview, and i have a column that is checkbox and i can select multiple file. i want with select multiple checkbox i can send multiple file to print. can i do this? can anybody help me? plz
|
|
|
|
|
The only thing a web app can do, is print the full browser window. So you need to open a print view for any document you want to print. Of course, the browser has to be able to display it.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi all,
Any one suggest me how to edit my url and submit the page on button click with out using Response.redirect.
for eg:
www.mysite.com/default.aspx
this is my page, on button click the page should submit and reload, the url should look like www.mysite.com/default.aspx?step=1 (no response.redirect, because i am losing the viewstate even though i set the EnableViewState="true")
Thank you
Know is Drop, Unknown is Ocean
|
|
|
|
|
If you redirect (for this read reload), you will not get any viewstate, you are reloading the page. Can you not just set a Viewstate-ed variable when you post back in the button click and re-bind your page?
|
|
|
|
|
Hi All,
We are using custom http handler, where we fetch large data value from a text field of database.
We later split this large data into chunks and write to response objects.
We are facing unique problem when the text size is nearly 4mb and when we are trying to write to context.Response.Write. It does not write in a single attempt, but calls the HandleRequest many times trying to write. In this time I am getting internet message Operation aborted.
Can any one tell how to overcome this scenario.
Thanks in Advance,
Naga.
|
|
|
|
|
let there be a gridview with some BoundFields then how i can retrive the
that value of a particular bound field value using javascript
|
|
|
|
|
Basically you need to make sure you give the controls that contain the values, ids that you can use to find those controls in js. A common way is to append the row number to the fields and build the ids row by row
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
In response to this question[^] on Stack Overflow, I have received less that satisfactory answers. One points to an example of how to add code behind to a view ( ), and another suggests "foreach is your friend". Just where would I use foreach, except in the controller injecting other sub-views into the view, but that is just a little too close to coupling controller and view. I can't believe the answerer meant in the actual view page, unless with JS, adding rows to a table based on view data.
How do I achieve the same effect as a dynamic row Repeater control, or even dynamic columns as well, as in a GridView, in a pure MVC model?
|
|
|
|
|
Hello Everybody,
I have written a code to send mail but it is not working properly.
I have added reference of System.Net.Mail; in C# code page and on botton click event I have written following code.
try
{
SmtpClient mySmtpClient = new SmtpClient();
MailMessage myMail = new MailMessage("hr@advantawitty.com", "dipak.dipak@gmail.com", "MyTest Mail", "Hello This is Test Mail using .net Coding");
myMail.IsBodyHtml = true;
mySmtpClient.Send(myMail);
lblMessage.Text = "Mail Successfully Sent";
}
catch (Exception Ex)
{
lblMessage.Text = Ex.ToString();
}
and in web.config file:
<mailsettings>
<smtp deliverymethod="Network">
<network host="smtp.advantawitty.com" port="25">
I am only confusing that what should be Smtp server name for my website..
when I am setting "localhost", it sends a mail which is stored in queue of mailroot on hard drive. But when i am uploading this it is not working..
how can i know my smtp server name?
Or is there any other mistake in the code or configuration?
Please help me...
Thank you.
Dipak
|
|
|
|
|
If SMTP is enabled in your web server, shouldn't it be something like "smtp.advantawitty.com"? Ask your service provider, he would be knowing the correct address and SMTP port number.
-------------------------------------------
It's code that drives you - Shyam
|
|
|
|
|
Thank you for reply.
I have asked to Provider and got the details
And it is finely working.
my code was correct but only I have added
mySmtpClient.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis;
and it is running properly.
Thank you.
Dipak
|
|
|
|