|
I want to create the dynamic field in existing table of sql server 2005 database when the user save the records through front end in asp.net using c# code.can anybody suggest me how to write the code for this using c#.please reply...
|
|
|
|
|
You have to run a store procedure which will take the name of the field to be added.That store procedure will have the TSQL commands for updating the table. Then run the store procedure from your c# code like you normally do.
Though i would not recommend you to do this. If you can tell me your scenario why you want to add a field on run time then perhaps i could tell you a better way then what you are trying to do now.
Ahsan Ullah
Senior Software Engineer
|
|
|
|
|
Sir i am doing the fee collection project in that when the user creating the head in the feeparticular master when he creates the fee head, automatically another feild will creates in other table like fld01,fld02 in this increment order. So that i can track that records. For this will you suggest me a code in asp.net using c#.
|
|
|
|
|
You don't need to make a new field every time.
you have to use the Primary key foreign key relation in the tables. This will solve your problem.
When a head is created a Primary key will be generated. Against that Primary key store the values in the other table.
Ahsan Ullah
Senior Software Engineer
|
|
|
|
|
I want to assign SessionID value to html textbox inorder using it in javascript. How can this be done?
Thanks
The Developer - CEH
|
|
|
|
|
You can get it directly in the JS.
function sample(){
var sessionId = '<% Session.SessionId %>' ;
}
|
|
|
|
|
it is giving me Compilation Error!!! By the way I'm using framework 1.1
The Developer - CEH
|
|
|
|
|
use This
var sID= '<%=Session.SessionID%>';
cheers,
Abhijit
|
|
|
|
|
Yes it works Thank you Abhijit
The Developer - CEH
|
|
|
|
|
Abhijit is right. Use that code.
|
|
|
|
|
yes he is right. and thanks for your help too
The Developer - CEH
|
|
|
|
|
use a hidden variable and store the session id in it during page load. Then you can use its value in javascript.
http://aspdotnetnstuff.blogspot.com
|
|
|
|
|
Thanks but Abhijit solved my problem. i can use the session directly from the javascript
The Developer - CEH
|
|
|
|
|
iam a having a string like this 'hi this is "john" iam a 'good,' boy:' so how can i get the words like this
hi
this
is
john
iam
a
good
boy
mean even though there are special characters we should get ony srtings
|
|
|
|
|
This question should be in VB.NET forum. You can use string.Split() to split string. Then iterate through the array and remove special characters.
|
|
|
|
|
There is an inbuilt function for split i.e. .split().
You also have to define a character symbol for it to know where to split like char[] ch={':'}
and place ch like this .split(ch).
http://aspdotnetnstuff.blogspot.com
|
|
|
|
|
yes you are right and in his case the space is the character symbol
The Developer - CEH
|
|
|
|
|
Hi,
I am about to do a site re-build and was looking at using Umbraco as the CMS. Was just wanting to get some opinions from anyone with previous experience in using it, and how they think it compares to other CMS's.
Thanks
Jamil
|
|
|
|
|
|
<asp:imagebutton id="knowledgeButton" runat="server" height="40px" width="40px" xmlns:asp="#unknown">
ImageUrl="~/Images/knowledge.gif" OnClientClick='<%# Knowledge(DataBinder.Eval(Container.DataItem,"ID")) %>' style="float: right"
ToolTip="Add to Knowledge Base" Width="40px"
Visible='<%# (DataBinder.Eval(Container.DataItem, "Knowledge") == "true" ? false : true)%>' />
</asp:imagebutton>
This is not working. But it is not giving me any errors. Basically that image I want it to be hidden if the Knowledge data is (STRING) true.
Can this be done? If so how come this isnt working?
|
|
|
|
|
Since it is a server button, why don't hide it from the codebehind ?
|
|
|
|
|
Because its in a DataList. How do I tell which exact one has the Knowledge value of a true? Then show it. Else keep it hidden?
|
|
|
|
|
I am using oracle as back-end. when i run the page from the IIS, it gives me an error (Unable to allocate environment handle) all of a sudden. at first it works perfect but suddenly this error appears and nothing works until and unless the server computer is re-started. can anyone please give suggestion to get rid of this error??
|
|
|
|
|
Hi,
how i set linkbutton onclick event to call formview
i want that when i click on linkbutton then associated record from database will appear in formview how i bind data with linkbuton or how i do that .
guide me how i acheive this.
Any suggestion or link is highly apperciated .
Thanks in advance
Regards
Rameez
|
|
|
|
|
I am new to ASP.Net 2.0 using VB. When the ModalPopup is shown, the DropDownLists disappear. Why? When these objects are on an UpdatePanel or not, they act the same way.
There are several DropDownLists on my page. Each DropDownList populates the next. One of the DropDownLists is to show a ModalPopup with the description of the selected item. When the ModalPopup is shown, the DropDownLists disappear. When the ModalPopup is closed by the user, the DropDownLists reappear, but it takes several clicks to get the dropdownlists back in sync. This is unacceptable.
If someone has had the same problem, I would appreciate hearing how you handled this.
Thanks,
Linda
modified on Sunday, August 17, 2008 8:24 PM
|
|
|
|